diff --git a/web_src/js/features/notification.ts b/web_src/js/features/notification.ts index e31fd5231e..cb025b9fd7 100644 --- a/web_src/js/features/notification.ts +++ b/web_src/js/features/notification.ts @@ -32,7 +32,7 @@ export function initNotificationCount() { if (notificationSettings.EventSourceUpdateTime > 0 && window.SharedWorker) { // Connect via WebSocket SharedWorker (one connection shared across all tabs) const wsUrl = `${window.location.origin}${appSubUrl}/-/ws`.replace(/^http/, 'ws'); - const worker = new SharedWorker(`${window.__webpack_public_path__}js/websocket.sharedworker.js?v=${assetVersionEncoded}`, 'notification-worker'); + const worker = new SharedWorker(`${window.__webpack_public_path__}js/websocket.sharedworker.js?v=${assetVersionEncoded}`, 'notification-worker-ws'); worker.addEventListener('error', (event) => { console.error('worker error', event); }); diff --git a/web_src/js/features/websocket.sharedworker.ts b/web_src/js/features/websocket.sharedworker.ts index f8cc635570..9925ba5bd6 100644 --- a/web_src/js/features/websocket.sharedworker.ts +++ b/web_src/js/features/websocket.sharedworker.ts @@ -1,7 +1,5 @@ // One WebSocket connection per URL, shared across all tabs via SharedWorker. // Messages from the server are JSON objects broadcast to all connected ports. -export {}; // make this a module to avoid global scope conflicts with other sharedworker files - const RECONNECT_DELAY_INITIAL = 50; const RECONNECT_DELAY_MAX = 10000;