Skip to content

Commit

Permalink
Better signal handling for termination
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Jan 11, 2025
1 parent e19957b commit 186274c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/loxinet/loxinet.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ func loxiNetTicker(bgpPeerMode bool) {
pprof.StopCPUProfile()
} else if sig == syscall.SIGINT || sig == syscall.SIGTERM {
tk.LogIt(tk.LogCritical, "Shutdown on sig %v\n", sig)
if !bgpPeerMode {
mh.dpEbpf.DpEbpfUnInit()
}
// TODO - More subsystem cleanup TBD
mh.zr.Rules.RuleDestructAll()
if mh.cloudHook != nil {
Expand All @@ -188,9 +191,6 @@ func loxiNetTicker(bgpPeerMode bool) {
}
}
}
if !bgpPeerMode {
mh.dpEbpf.DpEbpfUnInit()
}
mh.has.CIDestroy()
apiserver.ApiServerShutOk()
}
Expand Down

0 comments on commit 186274c

Please sign in to comment.