Skip to content

Commit

Permalink
Only consider connected after connecting
Browse files Browse the repository at this point in the history
Prior to this change IsConnected would return true for any state higher
than disconnected, this meant that we would return true while connecting
when it might not be possible at all to connect to any of the servers.

resolves #243
  • Loading branch information
alsm committed Oct 25, 2018
1 parent 8c3fc23 commit c237818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (c *client) IsConnected() bool {
switch {
case status == connected:
return true
case c.options.AutoReconnect && status > disconnected:
case c.options.AutoReconnect && status > connecting:
return true
default:
return false
Expand Down

0 comments on commit c237818

Please sign in to comment.