Skip to content

Commit

Permalink
remove unnecessary os.Exit() (#23)
Browse files Browse the repository at this point in the history
* remove unnecessary os.Exit()

* remove sleep when shutdown
  • Loading branch information
brianchennn authored Jun 7, 2023
1 parent cd0bd04 commit 22988ee
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/service/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os/signal"
"runtime/debug"
"syscall"
"time"

"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 22988ee

Please sign in to comment.