wait for goroutines to finish and for tun to actually be closed

This commit is contained in:
JackDoan
2026-04-16 13:19:25 -05:00
parent 183c1e3cfd
commit 6b2e6d9f55
6 changed files with 57 additions and 16 deletions

View File

@@ -85,7 +85,12 @@ func main() {
}
go ctrl.ShutdownBlock()
wait()
if err := wait(); err != nil {
l.WithError(err).Error("Nebula stopped due to fatal error")
l.Info("Goodbye")
os.Exit(2)
}
l.Info("Goodbye")
}

View File

@@ -80,7 +80,12 @@ func main() {
go ctrl.ShutdownBlock()
notifyReady(l)
wait()
if err := wait(); err != nil {
l.WithError(err).Error("Nebula stopped due to fatal error")
l.Info("Goodbye")
os.Exit(2)
}
l.Info("Goodbye")
}