mirror of https://github.com/status-im/consul.git
Restore NotifyListen to avoid panic in newServer retry (#6200)
This commit is contained in:
parent
a13de7dee9
commit
d86efb83e5
|
@ -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 New Issue