fix #188
This commit is contained in:
3
main.go
3
main.go
@ -39,7 +39,7 @@ func Clean(s *services.Service) {
|
|||||||
fmt.Printf("crashed, err: %s\nstack:\n%s", e, string(debug.Stack()))
|
fmt.Printf("crashed, err: %s\nstack:\n%s", e, string(debug.Stack()))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
for _ = range signalChan {
|
for range signalChan {
|
||||||
log.Println("Received an interrupt, stopping services...")
|
log.Println("Received an interrupt, stopping services...")
|
||||||
if s != nil && *s != nil {
|
if s != nil && *s != nil {
|
||||||
(*s).Clean()
|
(*s).Clean()
|
||||||
@ -55,4 +55,5 @@ func Clean(s *services.Service) {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
<-cleanupDone
|
<-cleanupDone
|
||||||
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user