Skip to content

Commit

Permalink
fix: reset ping tracker on websocket close (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Jul 17, 2022
1 parent 9d094e6 commit d119698
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -283,11 +283,16 @@ public void close() throws Exception {

@Synchronized
private void closeSocket() {
// Clean up the socket
if (webSocket != null) {
this.webSocket.disconnect();
this.webSocket.clearListeners();
this.webSocket = null;
}

// Reset latency tracker
this.latency = -1L;
lastPing.lazySet(0L);
}

}

0 comments on commit d119698

Please sign in to comment.