From 9beda3911d5d8ed4ac1bedb23c3b7bcd8abf2cc1 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 11 Jun 2025 13:30:51 +0200 Subject: [PATCH] Realtime UI - Prefer websocket then fallback to 'polling' mode, increase reconnecting retries. --- changedetectionio/static/js/realtime.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/changedetectionio/static/js/realtime.js b/changedetectionio/static/js/realtime.js index 8b2d0db0..67fb802c 100644 --- a/changedetectionio/static/js/realtime.js +++ b/changedetectionio/static/js/realtime.js @@ -48,9 +48,9 @@ $(document).ready(function () { // Connect to Socket.IO on the same host/port, with path from template const socket = io({ path: socketio_url, // This will be the path prefix like "/app/socket.io" from the template - transports: ['polling', 'websocket'], // Try WebSocket but fall back to polling - reconnectionDelay: 1000, - reconnectionAttempts: 15 + transports: ['websocket', 'polling'], + reconnectionDelay: 3000, + reconnectionAttempts: 25 }); // Connection status logging