mirror of https://github.com/status-im/consul.git
agent: Fixing panic on shutdown
This commit is contained in:
parent
e99f9dd070
commit
6a640604dd
|
@ -179,7 +179,7 @@ func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
|
|||
// Shutdown is used to shutdown the HTTP server
|
||||
func (s *HTTPServer) Shutdown() {
|
||||
if s != nil {
|
||||
s.logger.Printf("[DEBUG] http: Shutting down http server(%v)", s.addr)
|
||||
s.logger.Printf("[DEBUG] http: Shutting down http server (%v)", s.addr)
|
||||
s.listener.Close()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,6 @@ func (s *scadaListener) Close() error {
|
|||
return nil
|
||||
}
|
||||
s.closed = true
|
||||
close(s.pending)
|
||||
close(s.closedCh)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue