Skip to content

Commit 3ca47d2

Browse files
committed
refactor wrt will feedback
1 parent 0bdc7c3 commit 3ca47d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/pusher/client/connection/websocket/WebSocketConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ public void run() {
307307
}, reconnectInterval, TimeUnit.SECONDS);
308308
}
309309

310-
// Received error codes 4000 >= 4099 indicate we shouldn't attempt reconnection
310+
// Received error codes 4000-4099 indicate we shouldn't attempt reconnection
311311
// https://pusher.com/docs/pusher_protocol#error-codes
312312
private boolean shouldReconnect(int code) {
313-
return !(code >= 4000 && code <= 4099);
313+
return code < 4000 || code >= 4100;
314314
}
315315

316316
private void cancelTimeoutsAndTransitonToDisconnected() {

0 commit comments

Comments
 (0)