Skip to content

Commit

Permalink
send debug message before reconnecting, wait 5s before starting recon…
Browse files Browse the repository at this point in the history
…nect timer
  • Loading branch information
JulianVennen committed May 27, 2022
1 parent 3b57130 commit 207cba4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/exaroton/api/ws/WebSocketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ public void handleData(String type, String message) {
public void handleClose(int code, String reason, boolean remote) {
if (remote && this.shouldAutoReconnect()) {
reconnectTimer = new Timer();
this.sendDebug("Reconnecting in 5s");
reconnectTimer.schedule(new TimerTask() {
@Override
public void run() {
client.reconnect();
}
}, 0, 5000);
}, 5000, 5000);
}
}

Expand Down

0 comments on commit 207cba4

Please sign in to comment.