mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-04 15:27:55 +07:00
optimize: refine reloading
This commit is contained in:
@ -156,12 +156,18 @@ loop:
|
||||
} else {
|
||||
log.Warnln("[Reload] Stopped old control plane")
|
||||
}
|
||||
|
||||
// Inject bpf objects into the new control plane life-cycle.
|
||||
newC.InjectBpf(obj)
|
||||
c.Close()
|
||||
|
||||
// Prepare new context.
|
||||
oldC := c
|
||||
c = newC
|
||||
conf = newConf
|
||||
reloading = true
|
||||
|
||||
// Ready to close.
|
||||
oldC.Close()
|
||||
default:
|
||||
break loop
|
||||
}
|
||||
|
Reference in New Issue
Block a user