From 3b98a99171598d89a122de6181a74ce9d591715c Mon Sep 17 00:00:00 2001 From: Dan Van Atta Date: Tue, 30 Jul 2024 16:15:53 -0700 Subject: [PATCH] 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. --- .../triplea/http/client/web/socket/WebSocketConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/websocket-client/src/main/java/org/triplea/http/client/web/socket/WebSocketConnection.java b/lib/websocket-client/src/main/java/org/triplea/http/client/web/socket/WebSocketConnection.java index 99906b7a1cb..1717e1995d9 100644 --- a/lib/websocket-client/src/main/java/org/triplea/http/client/web/socket/WebSocketConnection.java +++ b/lib/websocket-client/src/main/java/org/triplea/http/client/web/socket/WebSocketConnection.java @@ -88,8 +88,8 @@ class WebSocketConnection { this.serverUri = serverUri; pingSender = Timers.fixedRateTimer("websocket-ping-sender") - .period(45, TimeUnit.SECONDS) - .delay(45, TimeUnit.SECONDS) + .period(10, TimeUnit.SECONDS) + .delay(10, TimeUnit.SECONDS) .task(this::sendPingTask); this.headers = headers; }