mirror of
https://github.com/daeuniverse/dae.git
synced 2025-03-09 20:30:08 +07:00
optimize: refine reloading
This commit is contained in:
parent
5807a7c11a
commit
d226d799b7
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user