fix: clean up SSE session on client disconnect (#2200)

Co-authored-by: Varun Sharma <sharmava@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
This commit is contained in:
Varun6578 2026-03-04 20:15:11 +05:30 • committed by GitHub
commit b3149d2f33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -186,6 +186,7 @@ class SseServerTransport:
)
await read_stream_writer.aclose()
await write_stream_reader.aclose()
self._read_stream_writers.pop(session_id, None)
logging.debug(f"Client session disconnected {session_id}")
logger.debug("Starting SSE response task")