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

pull/6203/head
Freddy 5 years ago committed by GitHub
parent a13de7dee9
commit d86efb83e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save