mirror of https://github.com/status-im/consul.git
Avoid panics during shutdown routine (#8412)
This commit is contained in:
parent
a4b373b333
commit
f1e8addbdf
|
@ -958,15 +958,21 @@ func (s *Server) Shutdown() error {
|
|||
}
|
||||
|
||||
// Close the connection pool
|
||||
s.connPool.Shutdown()
|
||||
if s.connPool != nil {
|
||||
s.connPool.Shutdown()
|
||||
}
|
||||
|
||||
s.acls.Close()
|
||||
if s.acls != nil {
|
||||
s.acls.Close()
|
||||
}
|
||||
|
||||
if s.config.NotifyShutdown != nil {
|
||||
s.config.NotifyShutdown()
|
||||
}
|
||||
|
||||
s.fsm.State().Abandon()
|
||||
if s.fsm != nil {
|
||||
s.fsm.State().Abandon()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue