We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc1f544 commit 25498aaCopy full SHA for 25498aa
src/mcp/client/stdio/__init__.py
@@ -167,8 +167,7 @@ async def stdin_writer():
167
tg.start_soon(stdin_writer)
168
169
try:
170
- async with read_stream, write_stream:
171
- yield read_stream, write_stream
+ yield read_stream, write_stream
172
finally:
173
# MCP spec: stdio shutdown sequence
174
# 1. Close input stream to server
@@ -194,6 +193,8 @@ async def stdin_writer():
194
193
pass
195
await read_stream_writer.aclose()
196
await write_stream_reader.aclose()
+ await read_stream.aclose()
197
+ await write_stream.aclose()
198
199
200
def _get_executable_command(command: str) -> str:
0 commit comments