Commit dd95fce
g97iulio1609
fix: use 'is not None' for related_request_id to handle id=0
When a JSON-RPC request uses id=0, notifications sent during tool
execution were not routed to the correct request stream because the
condition 'if related_request_id' evaluates to False for integer 0.
This caused notifications to be sent to the GET stream instead of the
POST stream for the specific request, making them invisible to clients
that don't have a GET SSE connection open (e.g. stateless mode).
Fix: change 'if related_request_id' to 'if related_request_id is not
None' in send_notification(), consistent with similar checks elsewhere
in the codebase (e.g. streamable_http.py line 984, 993, 997).
Fixes #12181 parent 62575ed commit dd95fce
File tree
1 file changed
+1
-1
lines changed1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
0 commit comments