mirror of
https://github.com/smittix/intercept.git
synced 2026-04-25 15:20:00 -07:00
fix: suppress stale WebSocket close message after stopping waterfall
stop() sets _ws = null before the async onclose fires, so the handler now early-returns when _ws is null instead of showing the misleading "WebSocket closed before ready" retry message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2996,6 +2996,8 @@ const Waterfall = (function () {
|
||||
};
|
||||
|
||||
_ws.onclose = () => {
|
||||
// stop() sets _ws = null before the async onclose fires.
|
||||
if (!_ws) return;
|
||||
if (!_wsOpened && _active) {
|
||||
// Wait for timeout-based fallback; avoid flapping to SSE on brief close/retry.
|
||||
_setStatus('WebSocket closed before ready. Waiting to retry/fallback...');
|
||||
|
||||
Reference in New Issue
Block a user