0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-13 16:05:05 +02:00

fix(websocket): remove export{} from sharedworker entry point, rename worker

- Remove `export {}` which caused webpack to tree-shake the entire
  SharedWorker bundle, resulting in an empty JS file with no connect
  handler — root cause of WebSocket never opening
- Rename SharedWorker instance from 'notification-worker' to
  'notification-worker-ws' to force browser to create a fresh worker
  instance instead of reusing a cached empty one
This commit is contained in:
Epid 2026-03-24 13:51:16 +03:00
parent b47686ce32
commit bf564d3f05

View File

@ -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;