diff --git a/pkg/loxinet/loxinet.go b/pkg/loxinet/loxinet.go index 5421c30c..027e6970 100644 --- a/pkg/loxinet/loxinet.go +++ b/pkg/loxinet/loxinet.go @@ -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 { @@ -188,9 +191,6 @@ func loxiNetTicker(bgpPeerMode bool) { } } } - if !bgpPeerMode { - mh.dpEbpf.DpEbpfUnInit() - } mh.has.CIDestroy() apiserver.ApiServerShutOk() }