3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-29 07:29:31 +01:00

always mark the service ready after rehash

This commit is contained in:
Shivaram Lingamneni 2021-07-04 19:51:35 -04:00
parent 364193df4e
commit 5fc7ac41da

View File

@ -531,6 +531,7 @@ func (server *Server) rehash() error {
defer server.rehashMutex.Unlock() defer server.rehashMutex.Unlock()
sdnotify.Reloading() sdnotify.Reloading()
defer sdnotify.Ready()
config, err := LoadConfig(server.configFilename) config, err := LoadConfig(server.configFilename)
if err != nil { if err != nil {
@ -716,11 +717,8 @@ func (server *Server) applyConfig(config *Config) (err error) {
// we are now ready to receive connections: // we are now ready to receive connections:
err = server.setupListeners(config) err = server.setupListeners(config)
if err == nil { if initial && err == nil {
// we are now open for business
if initial {
server.logger.Info("server", "Server running") server.logger.Info("server", "Server running")
}
sdnotify.Ready() sdnotify.Ready()
} }