File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -432,17 +432,16 @@ async def _handle_session_message(message: SessionMessage) -> None:
432432 # Fix #1401: Propagate exception to all pending requests
433433 # This prevents waiters from hanging when the transport fails
434434 error_data = (
435- message .to_error_data ()
436- if isinstance (message , MCPError )
435+ message .to_error_data ()
436+ if isinstance (message , MCPError )
437437 else ErrorData (code = 0 , message = str (message ))
438438 )
439- jsonrpc_error = JSONRPCError (jsonrpc = "2.0" , id = None , error = error_data ) # id=None because it applies to all
440-
439+
441440 # We must send an error to every individual waiter
442441 for req_id , stream in list (self ._response_streams .items ()):
443442 # Send a response with the correct ID
444443 await stream .send (JSONRPCError (jsonrpc = "2.0" , id = req_id , error = error_data ))
445-
444+
446445 continue
447446
448447 await _handle_session_message (message )
You can’t perform that action at this time.
0 commit comments