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.
This commit is contained in:
parent
1384b966e8
commit
57259b6e3a
1 changed files with 4 additions and 4 deletions
|
|
@ -15056,10 +15056,10 @@ let globalPollingFailureCount = 0; // Track consecutive failures for exponential
|
||||||
let globalPollingBaseInterval = 2000; // Base polling interval in ms - MATCHES sync.py exactly
|
let globalPollingBaseInterval = 2000; // Base polling interval in ms - MATCHES sync.py exactly
|
||||||
|
|
||||||
function startGlobalDownloadPolling() {
|
function startGlobalDownloadPolling() {
|
||||||
if (socketConnected) {
|
// Always run HTTP polling as a fallback — WebSocket connections can silently
|
||||||
console.debug('🔄 [Global Polling] WebSocket active, skipping HTTP polling');
|
// stop delivering messages (room subscription lost, server emit error, proxy
|
||||||
return; // WebSocket handles download updates via room subscriptions
|
// timeout) without triggering a disconnect event. The 2-second poll is cheap
|
||||||
}
|
// (single batched request) and ensures modals never go stale.
|
||||||
if (globalDownloadStatusPoller) {
|
if (globalDownloadStatusPoller) {
|
||||||
console.debug('🔄 [Global Polling] Already running, skipping start');
|
console.debug('🔄 [Global Polling] Already running, skipping start');
|
||||||
return; // Prevent duplicate pollers
|
return; // Prevent duplicate pollers
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue