Fix a crash when service shutdown is signaled and object API is not ready yet (#2939)

This commit is contained in:
Anis Elleuch 2016-10-15 14:20:16 +01:00 committed by Harshavardhana
parent 17eeec6895
commit f463d3ce42

View file

@ -113,8 +113,9 @@ func (m *ServerMux) handleServiceSignals() error {
if objAPI == nil {
// Server not initialized yet, exit happily.
runExitFn(nil)
} else {
runExitFn(objAPI.Shutdown())
}
runExitFn(objAPI.Shutdown())
}
}
}