Skip to content

Commit 3b98a99

Browse files
authored
Lobby websocket - fix disconnect - increase ping frequency (#12806)
Lobby was upgraded recently to be on a newer version of the server platform. Seemingly the websocket timeout has dropped to 30 seconds. The previous keep-alive of 45 seconds was not enough. Changing the value to 10 seconds allows for 3 failed tries before a disconnect.
1 parent f70bc23 commit 3b98a99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/websocket-client/src/main/java/org/triplea/http/client/web/socket/WebSocketConnection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ class WebSocketConnection {
8888
this.serverUri = serverUri;
8989
pingSender =
9090
Timers.fixedRateTimer("websocket-ping-sender")
91-
.period(45, TimeUnit.SECONDS)
92-
.delay(45, TimeUnit.SECONDS)
91+
.period(10, TimeUnit.SECONDS)
92+
.delay(10, TimeUnit.SECONDS)
9393
.task(this::sendPingTask);
9494
this.headers = headers;
9595
}

0 commit comments

Comments
 (0)