Skip to content

Commit

Permalink
fix handling disconnect push
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Apr 27, 2023
1 parent e15e1b2 commit 4a83ade
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,9 @@ func (c *Client) handlePush(push *protocol.Push) {
code := push.Disconnect.Code
reconnect := code < 3500 || code >= 5000 || (code >= 4000 && code < 4500)
if reconnect {
c.moveToDisconnected(code, push.Disconnect.Reason)
} else {
c.moveToConnecting(code, push.Disconnect.Reason)
} else {
c.moveToDisconnected(code, push.Disconnect.Reason)
}
default:
}
Expand Down

0 comments on commit 4a83ade

Please sign in to comment.