You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e32d336
Browse filesBrowse the repository at this point in the historyBrowse files
Clean up and accurately report WebSocket receive-loop termination (#102)
A recv() failure after the initial handshake now emits one
receiveMessageError and completes the connection wrapper without
re-raising through setup error handling, so it is no longer
relabeled as createConnectionError. Every receive-loop termination
(receive failure, cancellation, or intentional closure) marks the
client not ready and cancels its heartbeat task; intentional
closure emits no receive error. createConnectionError remains
reserved for connection establishment and the initial handshake.
- Triggers the connectionCreated event upon successful connection establishment.
82
83
- Listens for incoming messages and triggers the receiveMessage event for each received message.
83
84
- Isolates receive-message handler failures so a handler that raises does not stop delivery to the remaining handlers or reception of future messages; each failure triggers the receiveMessageError event with the original exception.
84
-
- Triggers the createConnectionError event if an error occurs during the connection process and raises the exception.
85
+
- Triggers the createConnectionError event if an error occurs while establishing the connection or during the initial handshake, and raises the exception.
86
+
- A failure from receiving messages after the initial handshake triggers the receiveMessageError event once; it is not reported as a connection-creation error and does not propagate to the connection-setup or recovery wrappers.
87
+
- When the receive loop terminates (receive failure, cancellation, or intentional closure), the client is marked not ready and its heartbeat task is cancelled.
88
+
- An intentional closure does not trigger the receiveMessageError event.
0 commit comments