Skip to content

Commit 37e9e21

Browse files
authored
Merge branch 'main' into copilot/support-latest-server-everything
2 parents 6a46049 + 3caac28 commit 37e9e21

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ModelContextProtocol.Core/Client/StdioClientSessionTransport.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ protected override async ValueTask CleanupAsync(Exception? error = null, Cancell
7272
try
7373
{
7474
// The process has exited, but we still need to ensure stderr has been flushed.
75+
// WaitForExitAsync only waits for exit; it does not guarantee that all
76+
// ErrorDataReceived events have been dispatched. The synchronous WaitForExit()
77+
// (no arguments) does ensure that, so call it after WaitForExitAsync completes.
7578
#if NET
7679
await _process.WaitForExitAsync(cancellationToken).ConfigureAwait(false);
77-
#else
78-
_process.WaitForExit();
7980
#endif
81+
_process.WaitForExit();
8082
}
8183
catch { }
8284

0 commit comments

Comments
 (0)