mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
wait for goroutines to finish and for tun to actually be closed
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user