Skip to content

Disposing IMcpClient and transport is unsafe #944

@asklar

Description

@asklar

Describe the bug

await using var client = await McpClientFactory.CreateAsync(transport, clientOptions).ConfigureAwait(false);

This can throw OperationCanceledException as part of teardown; please consider swallowing cancellations that happen as part of DisposeAsync, or document how these should be handled with await using

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions