Restore NotifyListen to avoid panic in newServer retry (#6200)
This commit is contained in:
parent
12d263e6b0
commit
c19f46639b
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue