Restore NotifyListen to avoid panic in newServer retry (#6200)

This commit is contained in:
Freddy 2019-07-23 14:33:00 -06:00 committed by GitHub
parent a13de7dee9
commit d86efb83e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ func newServer(c *Config) (*Server, error) {
oldNotify()
}
}
// Restore old notify to guard against re-closing `up` on a retry
defer func() {
c.NotifyListen = oldNotify
}()
// start server
w := c.LogOutput