mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-18 17:56:52 +01:00
wait for goroutines to finish and for tun to actually be closed
This commit is contained in:
1 parent
183c1e3cfd
commit
6b2e6d9f55
6 files changed
+57
-16
No files matched your search
@@ -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")
|
||||
}
|
||||
|
||||
+6
-1
@@ -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