fix mutex lock due to trying to lock in a lock

This commit is contained in:
Liam Stanley 2017-02-13 22:56:50 -05:00
parent 2a4c9412b2
commit d2fb3c20d2

@ -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