From 57259b6e3a9697ec41c1bb6e2f2bd35645e58bef Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:08:48 -0700 Subject: [PATCH] Always run HTTP polling for download modal updates The global download poller was disabled when WebSocket was connected, but WebSocket connections can silently stop delivering messages without triggering a disconnect event (room subscription lost, server emit error, proxy timeout). This left modals frozen while downloads continued server-side. Removing the socketConnected gate ensures the 2-second HTTP poll always runs as a fallback alongside WebSocket. --- webui/static/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webui/static/script.js b/webui/static/script.js index e14e195e..61e98809 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -15056,10 +15056,10 @@ let globalPollingFailureCount = 0; // Track consecutive failures for exponential let globalPollingBaseInterval = 2000; // Base polling interval in ms - MATCHES sync.py exactly function startGlobalDownloadPolling() { - if (socketConnected) { - console.debug('🔄 [Global Polling] WebSocket active, skipping HTTP polling'); - return; // WebSocket handles download updates via room subscriptions - } + // Always run HTTP polling as a fallback — WebSocket connections can silently + // stop delivering messages (room subscription lost, server emit error, proxy + // timeout) without triggering a disconnect event. The 2-second poll is cheap + // (single batched request) and ensures modals never go stale. if (globalDownloadStatusPoller) { console.debug('🔄 [Global Polling] Already running, skipping start'); return; // Prevent duplicate pollers