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:
parent
cc22bf5464
commit
b3149d2f33
1 changed files with 28 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue