Skip to content

Commit

Permalink
Merge pull request #416 from ChIoT-Tech/CrashOnReconnect
Browse files Browse the repository at this point in the history
On failed connection incorrectly checked conn stat
  • Loading branch information
Al S-M committed May 4, 2020
2 parents a11cb81 + d96ca80 commit b456efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Expand Up @@ -308,7 +308,7 @@ func (c *client) reconnect() {
sleep = c.options.MaxReconnectInterval
}
// Disconnect may have been called
if atomic.LoadUint32(&c.status) != disconnected {
if atomic.LoadUint32(&c.status) == disconnected {
break
}
}
Expand Down

0 comments on commit b456efa

Please sign in to comment.