3x-ui/web/assets
MHSanaei b84b58ef21
fix(websocket): guard stale events and disconnect race in JS client
Two subtle race conditions in the browser WebSocket client:

1. Stale-event clobber. When connect() is called while the old socket is
   in CLOSING state, the readyState guard falls through and a new socket
   is assigned to this.ws. The old socket's queued close event then
   nulls out this.ws, silently breaking send() until the next reconnect.
   Same risk for delayed open/error/message handlers.

2. Reconnect-after-disconnect. clearTimeout() does not cancel a callback
   that has already fired but whose macrotask has not yet run. If
   disconnect() lands in that window, the queued reconnect callback
   still calls #openSocket() and resurrects the connection.

Every event handler now bails out if this.ws no longer points at the
socket that fired the event, and the reconnect timer callback re-checks
shouldReconnect before opening a new socket.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 00:00:10 +02:00
..
ant-design-vue DevTools 2025-10-02 01:47:12 +02:00
axios DevTools 2025-10-02 01:47:12 +02:00
codemirror [CodeFactor] Apply fixes (#2595) 2024-11-12 01:28:00 +03:30
css fix(panel-update): poll for restart, fix dark-mode version label 2026-05-07 20:55:22 +02:00
js fix(websocket): guard stale events and disconnect race in JS client 2026-05-08 00:00:10 +02:00
moment DevTools 2025-10-02 01:47:12 +02:00
otpauth DevTools 2025-10-02 01:47:12 +02:00
persian-datepicker css , jalali minify 2024-04-17 16:02:03 +03:30
qrcode QRious2 (#2156) 2024-04-01 10:38:22 +03:30
qs 3x-ui 2023-02-09 22:48:06 +03:30
uri URI.js v1.19.11 2024-04-17 16:07:07 +03:30
vue remove unnecessary vue files 2025-08-12 12:56:49 +02:00
Vazirmatn-UI-NL-Regular.woff2 Change font to Vazirmatn #1286 2023-12-04 19:01:09 +01:00