From b3bdd5b75c9c6e4ced3a3f7a6364a906e326c5c0 Mon Sep 17 00:00:00 2001 From: Rafael Leite Date: Wed, 8 Aug 2018 14:27:23 -0300 Subject: [PATCH] Fix concurrently closing and writing to the same chan https://go101.org/article/channel-closing.html --- client/client.go | 1 - 1 file changed, 1 deletion(-) diff --git a/client/client.go b/client/client.go index 5bc6605e..c3d2509e 100644 --- a/client/client.go +++ b/client/client.go @@ -301,7 +301,6 @@ func (c *Client) Disconnect() { if c.Connected { c.Connected = false close(c.closeChan) - close(c.IncomingMsgChan) c.conn.Close() } }