Fix panic on shutdown

This commit is contained in:
Julian Kornberger 2016-03-07 10:28:24 +01:00
parent 1fd59e6156
commit 93fafcb8e2

View File

@ -90,6 +90,10 @@ func main() {
log.Println("received", sig)
// Close everything at the end
wsserverForNodes.Close()
respondDaemon.Close()
if wsserverForNodes != nil {
wsserverForNodes.Close()
}
if respondDaemon != nil {
respondDaemon.Close()
}
}