Commit 328bb0b
committed
fix: also catch BrokenResourceError from respond() for SHTTP terminate()
streamable_http's terminate() closes _write_stream_reader (the receive
end) before _write_stream (the send end). A handler reaching respond()
between those two closes gets BrokenResourceError (peer end closed)
rather than ClosedResourceError (our end closed). The stdio path only
ever hits ClosedResourceError because _receive_loop's async-with closes
the send end.1 parent e1d712d commit 328bb0b
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
| |||
0 commit comments