mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-16 19:16:52 +01:00
Remove more os.Exit calls and give a more reliable wait for stop function
This commit is contained in:
1 parent
fb7f0c3657
commit
f46b83f2c4
6 files changed
+121
-33
No files matched your search
@@ -65,8 +65,16 @@ func main() {
|
||||
}
|
||||
|
||||
if !*configTest {
|
||||
ctrl.Start()
|
||||
ctrl.ShutdownBlock()
|
||||
wait, err := ctrl.Start()
|
||||
if err != nil {
|
||||
util.LogWithContextIfNeeded("Error while running", err, l)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
go ctrl.ShutdownBlock()
|
||||
wait()
|
||||
|
||||
l.Info("Goodbye")
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
|
||||
Reference in new issue
Block a user