Skip to content

Commit

Permalink
Restore NotifyListen to avoid panic in newServer retry (#6200)
Browse files Browse the repository at this point in the history
  • Loading branch information
freddygv authored Jul 23, 2019
1 parent a13de7d commit d86efb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/consul/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d86efb8

Please sign in to comment.