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
fix: propagate SSE stream errors to waiting requests
Fixes#1401. Also fixes#1789 (closed as duplicate).
When an SSE read timeout occurs during a StreamableHTTP POST request, the
pending send_request call hangs indefinitely. The transport catches the
exception but never sends an error back through the read stream, leaving
the caller blocked on response_stream_reader.receive() with nothing to
receive.
This fix propagates SSE stream failures as JSONRPCError to the waiting
request, keeping failures isolated to the affected request rather than
tearing down the entire session.
Changes:
- _handle_sse_response now sends JSONRPCError when SSE stream ends without
a complete response
- _handle_reconnection returns bool to indicate success/failure
- handle_get_stream tracks received_events to properly count reconnection
attempts
- _default_message_handler logs warnings for unhandled exceptions
0 commit comments