Uh oh!
There was an error while loading. Please reload this page.
fix: surface stateful HTTP session crash cause - #2742
Conversation
66487ae to
08bbc28Compare08bbc28 to
fc85da9Comparehe-yufeng
commented
Jun 10, 2026
Rebased this on current Validation run locally on Windows: The error log lines in that targeted pytest run are expected: the new regression test deliberately crashes the session runner and asserts that the JSON response reports the original session exception instead of only the downstream closed-stream error. |
he-yufeng
commented
Jun 23, 2026
Closing this. Since I opened it, |
Summary
app.run()exception when a POST fails after the session stream closesClosedResourceErrorwhen reporting the failure back to an already closed writerFixes#2741.
To verify
python -m pytest tests\server\test_streamable_http_manager.py -qpython -m ruff check src\mcp\server\streamable_http.py src\mcp\server\streamable_http_manager.py tests\server\test_streamable_http_manager.pypython -m ruff format --check src\mcp\server\streamable_http.py src\mcp\server\streamable_http_manager.py tests\server\test_streamable_http_manager.pygit diff --check -- src\mcp\server\streamable_http.py src\mcp\server\streamable_http_manager.py tests\server\test_streamable_http_manager.py