Skip to content

Commit 1fb5448

Browse files
committed
close unclosed streams that were masked by not cought exceptions
1 parent acce290 commit 1fb5448

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mcp/client/stdio/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ async def stdin_writer():
187187
pass
188188
await read_stream.aclose()
189189
await write_stream.aclose()
190+
await read_stream_writer.aclose()
191+
await write_stream_reader.aclose()
190192

191193

192194
def _get_executable_command(command: str) -> str:

0 commit comments

Comments
 (0)