agent: Fixing panic on shutdown

pull/711/head
Armon Dadgar 2015-02-05 17:29:55 -08:00
parent e99f9dd070
commit 6a640604dd
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 // Shutdown is used to shutdown the HTTP server
func (s *HTTPServer) Shutdown() { func (s *HTTPServer) Shutdown() {
if s != nil { 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() s.listener.Close()
} }
} }

View File

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