We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd73448 commit 3817fe2Copy full SHA for 3817fe2
1 file changed
src/mcp/shared/session.py
@@ -281,16 +281,15 @@ async def send_request(
281
response_or_error = await response_stream_reader.receive()
282
283
if scope.cancel_called:
284
- with anyio.CancelScope(shield=True):
285
- notification = CancelledNotification(
286
- method="notifications/cancelled",
287
- params=CancelledNotificationParams(
288
- requestId=request_id, reason="cancelled"
289
- ),
290
- )
291
- await self._send_notification_internal(
292
- notification, request_id
293
+ notification = CancelledNotification(
+ method="notifications/cancelled",
+ params=CancelledNotificationParams(
+ requestId=request_id, reason="cancelled"
+ ),
+ )
+ await self._send_notification_internal(
+ notification, request_id
294
295
raise McpError(
296
ErrorData(
0 commit comments