Skip to content

Commit 20f8acb

Browse files
committed
refactor: remove redundant clear() call in terminate()
After popping all items from _sse_stream_writers dict, the clear() call is redundant since the dict is already empty. This is a minor cleanup with no functional change.
1 parent 43e5a9d commit 20f8acb

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/mcp/server/streamable_http.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,6 @@ async def terminate(self) -> None:
791791
if writer:
792792
writer.close()
793793

794-
# Clear the SSE stream writers dictionary
795-
self._sse_stream_writers.clear()
796-
797794
# We need a copy of the keys to avoid modification during iteration
798795
request_stream_keys = list(self._request_streams.keys())
799796

0 commit comments

Comments
 (0)