mirror of
https://github.com/smittix/intercept.git
synced 2026-06-11 15:33:32 -07:00
37842dc1ef
simple-websocket 1.1.0's receive(timeout=N) returns None on timeout instead of raising TimeoutError. The handler treated None as "connection closed" and broke out of the loop, causing Werkzeug to write its HTTP 200 response on the still-open WebSocket socket. The browser saw those HTTP bytes as an invalid WebSocket frame. Now checks ws.connected to distinguish timeout (None + connected) from actual close (None + not connected). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>