Skip to content

Commit cc1f544

Browse files
committed
readd aclose
1 parent dbe7abf commit cc1f544

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mcp/client/stdio/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
import os
33
import sys
4-
from contextlib import AsyncExitStack, asynccontextmanager
4+
from contextlib import asynccontextmanager
55
from pathlib import Path
66
from typing import Literal, TextIO
77

@@ -192,6 +192,8 @@ async def stdin_writer():
192192
except ProcessLookupError:
193193
# Process already exited, which is fine
194194
pass
195+
await read_stream_writer.aclose()
196+
await write_stream_reader.aclose()
195197

196198

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

0 commit comments

Comments
 (0)