agent: Fixing panic on shutdown

This commit is contained in:
Armon Dadgar 2015-02-05 17:29:55 -08:00
parent 75849d643e
commit d9f95e2983
2 changed files with 1 additions and 2 deletions

View File

@ -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()
}
}

View File

@ -141,7 +141,6 @@ func (s *scadaListener) Close() error {
return nil
}
s.closed = true
close(s.pending)
close(s.closedCh)
return nil
}