diff --git a/conn.go b/conn.go index c255417..ecbe556 100644 --- a/conn.go +++ b/conn.go @@ -311,12 +311,10 @@ func (c *Client) Reconnect() error { } func (c *Client) disconnectHandler() { - c.cmux.Lock() err := c.reconnect(false) if err != nil && c.Config.HandleError != nil { c.Config.HandleError(err) } - c.cmux.Unlock() } // readLoop sets a timeout of 300 seconds, and then attempts to read from the