From 8585188002fc6dc0dc0535a62e29797560ba6ed9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 May 2025 06:47:27 +0000 Subject: [PATCH 1/2] Initial plan for issue From d5a0fe9f90bd1093330d52c6e5523aa4c3f75e80 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 May 2025 06:51:32 +0000 Subject: [PATCH 2/2] Increase WebSocket reconnect retry limit from 5 to 10 Co-authored-by: zhou9584 <26757995+zhou9584@users.noreply.github.com> --- .../microsoft/hydralab/agent/socket/AgentWebSocketClient.java | 3 ++- gradlew | 0 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 gradlew diff --git a/agent/src/main/java/com/microsoft/hydralab/agent/socket/AgentWebSocketClient.java b/agent/src/main/java/com/microsoft/hydralab/agent/socket/AgentWebSocketClient.java index 9717bb7d7..91cd5f8a4 100644 --- a/agent/src/main/java/com/microsoft/hydralab/agent/socket/AgentWebSocketClient.java +++ b/agent/src/main/java/com/microsoft/hydralab/agent/socket/AgentWebSocketClient.java @@ -76,9 +76,10 @@ public void onClose(int code, String reason, boolean remote) { } // if the connection is closed by server with 1008, wait and retry + // Allow up to 10 reconnect attempts before exiting if (code == CloseReason.CloseCodes.VIOLATED_POLICY.getCode()) { violatedReconnectTime++; - if(violatedReconnectTime > 5) { + if(violatedReconnectTime > 10) { log.error("onClose, code: {}, reason: {}, remote: {}, reconnectTime: {}, {}", code, reason, remote, reconnectTime, violatedReconnectTime); System.exit(code); } else { diff --git a/gradlew b/gradlew old mode 100644 new mode 100755