Fix StdioServerTransport.DisposeAsync() hang: CancellableStdinStream missing Dispose override (#1276)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
186cb93630
commit
841e810167
1 changed files with 11 additions and 1 deletions
|
|
@ -59,6 +59,16 @@ public sealed class StdioServerTransport : StreamServerTransport
|
|||
}
|
||||
#endif
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
stdinStream.Dispose();
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
// The McpServer shouldn't call flush on the stdin Stream, but it doesn't need to throw just in case.
|
||||
public override void Flush() { }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue