Commit 2efbb42
committed
Fix infinite retry loop in StreamableHTTP _handle_reconnection
When a reconnection succeeds at the HTTP level but the SSE stream ends
without delivering a complete response, _handle_reconnection recursed
with attempt=0, resetting the counter and making MAX_RECONNECTION_ATTEMPTS
ineffective. This caused the client to retry forever if the server
repeatedly accepted connections but dropped streams.
Pass attempt + 1 instead of 0 so total reconnection attempts are properly
tracked across recursions.
Fixes #23931 parent d5b9155 commit 2efbb42
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| |||
0 commit comments