From 220d04b6962dc70aacdc2729e846ad1f2640eee3 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 9 May 2018 16:34:53 +0100 Subject: [PATCH] No need to close the log messages channel Closing the channel sometimes resulted in writes to a closed channel. Instead, the channel will be cleared up by GC as the socket is removed from the sync.Map anyway. --- web/stream.go | 1 - 1 file changed, 1 deletion(-) diff --git a/web/stream.go b/web/stream.go index 9c67afc6..6f559d49 100644 --- a/web/stream.go +++ b/web/stream.go @@ -49,7 +49,6 @@ func (h *stream) Fire(entry *logrus.Entry) error { select { case <-ws.quit: - close(ws.msgs) break case ws.msgs <- h.Format(entry): break