3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-28 23:19:30 +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()
sdnotify.Reloading()
defer sdnotify.Ready()
config, err := LoadConfig(server.configFilename)
if err != nil {
@ -716,11 +717,8 @@ func (server *Server) applyConfig(config *Config) (err error) {
// we are now ready to receive connections:
err = server.setupListeners(config)
if err == nil {
// we are now open for business
if initial {
if initial && err == nil {
server.logger.Info("server", "Server running")
}
sdnotify.Ready()
}