fix mutex lock due to trying to lock in a lock
This commit is contained in:
parent
2a4c9412b2
commit
d2fb3c20d2
2
conn.go
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user