Commit 17f2a62
fix: notify session when SSE stream closes without event ID
Fixes #1811
When an SSE stream closes without having received any events with IDs,
the client would silently return without notifying the session layer.
This left `call_tool()` hanging indefinitely since the session never
received a response or error.
Now when the stream closes without a `last_event_id` (meaning we can't
reconnect), we send a JSONRPCError with CONNECTION_CLOSED code back
to the session so the request properly fails instead of hanging.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent a1d330d commit 17f2a62
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
340 | | - | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
343 | 360 | | |
344 | 361 | | |
345 | 362 | | |
| |||
0 commit comments