Skip to content

Commit

Permalink
Move cancel before clean
Browse files Browse the repository at this point in the history
  • Loading branch information
joyrex2001 committed Oct 30, 2023
1 parent 6a82d10 commit b62f8e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ func exitHandler(kub backend.Backend, cancel context.CancelFunc) {
syscall.SIGQUIT)
go func() {
<-sigc
cancel()
klog.Info("exit signal recieved, removing pods, configmaps and services")
if err := kub.DeleteWithKubedockID(config.InstanceID); err != nil {
klog.Errorf("error pruning resources: %s", err)
}
cancel()
os.Exit(0)
}()
}

0 comments on commit b62f8e9

Please sign in to comment.