mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 15:16:52 +01:00
more fixes!
This commit is contained in:
1 parent
ee7d6cf90c
commit
7896f2093b
5 files changed
+34
-21
No files matched your search
@@ -45,13 +45,14 @@ func (p *program) Start(s service.Service) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := p.control.Start(); err != nil {
|
||||
wait, err := p.control.Start()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Nebula can stop itself on a fatal packet reader error, make sure to log it if it happens.
|
||||
go func() {
|
||||
if err := p.control.Wait(); err != nil {
|
||||
if err := wait(); err != nil {
|
||||
logger.Error(fmt.Sprintf("Nebula stopped due to fatal error: %v", err))
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
+3
-2
@@ -84,7 +84,8 @@ func main() {
|
||||
}
|
||||
|
||||
if !*configTest {
|
||||
if err := ctrl.Start(); err != nil {
|
||||
wait, err := ctrl.Start()
|
||||
if err != nil {
|
||||
util.LogWithContextIfNeeded("Error while running", err, l)
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -92,7 +93,7 @@ func main() {
|
||||
go ctrl.ShutdownBlock()
|
||||
notifyReady(l)
|
||||
|
||||
if err := ctrl.Wait(); err != nil {
|
||||
if err := wait(); err != nil {
|
||||
l.Error("Nebula stopped due to fatal error", "error", err)
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user