From 6a640604dded2527bdcc60b52eac8f440dec216f Mon Sep 17 00:00:00 2001 From: Armon Dadgar <armon.dadgar@gmail.com> Date: Thu, 5 Feb 2015 17:29:55 -0800 Subject: [PATCH] agent: Fixing panic on shutdown --- command/agent/http.go | 2 +- command/agent/scada.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/command/agent/http.go b/command/agent/http.go index 236fd451f2..e80b459a6e 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -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() } } diff --git a/command/agent/scada.go b/command/agent/scada.go index f94bfe7143..b47b435caa 100644 --- a/command/agent/scada.go +++ b/command/agent/scada.go @@ -141,7 +141,6 @@ func (s *scadaListener) Close() error { return nil } s.closed = true - close(s.pending) close(s.closedCh) return nil }