Skip to content

Commit f0057a5

Browse files
committed
Update test docstring to reference correct issue (#1227)
The fix addresses stale session entries in _read_stream_writers after disconnect (202 + ClosedResourceError symptom from #1227), not the EventSource auto-reconnect scenario from #423 which is a client-side concern already mitigated by #822 and #1478.
1 parent 3d28ad1 commit f0057a5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/shared/test_sse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,12 +615,12 @@ async def mock_aiter_sse() -> AsyncGenerator[ServerSentEvent, None]:
615615

616616
@pytest.mark.anyio
617617
async def test_sse_session_cleanup_on_disconnect(server: None, server_url: str) -> None:
618-
"""Regression test for https://github.com/modelcontextprotocol/python-sdk/issues/423
618+
"""Regression test for https://github.com/modelcontextprotocol/python-sdk/issues/1227
619619
620620
When a client disconnects, the server should remove the session from
621621
_read_stream_writers. Without this cleanup, stale sessions accumulate and
622-
POST requests to disconnected sessions are incorrectly accepted instead
623-
of returning 404.
622+
POST requests to disconnected sessions return 202 Accepted followed by a
623+
ClosedResourceError when the server tries to write to the dead stream.
624624
"""
625625
captured_session_id: str | None = None
626626

0 commit comments

Comments
 (0)