Add reconnectDelay variable for WebSocket reconnection logic
This commit is contained in:
@@ -29,6 +29,7 @@ function newCommandId() {
|
||||
let _httpPollTimer = null;
|
||||
let _wsHealthTimer = null;
|
||||
let _lastWsMessage = 0;
|
||||
let _reconnectDelay = 1000;
|
||||
|
||||
const HTTP_POLL_INTERVAL = 10_000; // Poll HTTP every 10 s as fallback
|
||||
const WS_STALE_TIMEOUT = 35_000; // If no WS message for 35 s → reconnect
|
||||
|
||||
Reference in New Issue
Block a user