From 22988ee2772890f19a6d7888431fa885fa35cddc Mon Sep 17 00:00:00 2001 From: brianchennn <46628572+brianchennn@users.noreply.github.com> Date: Wed, 7 Jun 2023 13:56:10 +0800 Subject: [PATCH] remove unnecessary os.Exit() (#23) * remove unnecessary os.Exit() * remove sleep when shutdown --- pkg/service/init.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/service/init.go b/pkg/service/init.go index 8106c13d..0389b685 100644 --- a/pkg/service/init.go +++ b/pkg/service/init.go @@ -9,7 +9,6 @@ import ( "os/signal" "runtime/debug" "syscall" - "time" "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" @@ -160,8 +159,6 @@ func (a *N3iwfApp) WaitRoutineStopped(n3iwfContext *n3iwf_context.N3IWFContext) n3iwfContext.Wg.Wait() // Waiting for negotiatioon with netlink for deleting interfaces a.Terminate(n3iwfContext) - time.Sleep(2 * time.Second) - os.Exit(0) } func (a *N3iwfApp) InitDefaultXfrmInterface(n3iwfContext *n3iwf_context.N3IWFContext) error {