You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
StdioClientTransport#close() does not wait until underlying process is closed #271
Calling StdioClientTransport#close() does not wait until the underlying process is closed. This makes it hard to properly shut down the server.
To Reproduce
The code snippet in microsoft/playwright-mcp#141 showcases this well. The underlying @playwright/mcp server doesn't exit after calling close(), which is a bug in the implementation, but it can't be observed from the code because StdioClientTransport#close() returns immediately.
Expected behavior
close() blocks until the underlying process exits.
Additional context
close() returns a Promise, which implies that it waits for something.
Activity
Ensuring stdio transport closure despite server hanging. Fixing model…
TomasRup commentedon Apr 11, 2025
Hey @Skn0tt, I've reproduced your case indeed and tried to mimic what you server was doing before in a test. Check it out #314
Merge pull request modelcontextprotocol#271 from pulkitsharma07/progr…