Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: properly handle multiple MCPClient closes without cancel-scope errors#4

Open
askdevai-bot wants to merge 1 commit intoaskbudi:main from
askdevai-bot:fix/multi-mcp-client-close
Open

fix: properly handle multiple MCPClient closes without cancel-scope errors #4
askdevai-bot wants to merge 1 commit intoaskbudi:main from
askdevai-bot:fix/multi-mcp-client-close

Conversation

@askdevai-bot
Copy link

@askdevai-bot askdevai-bot commented May 26, 2025

What it does

  • Removes AsyncExitStack dependency to avoid cross-client cancel-scope conflicts.
  • Introduces manual context management using __aenter__/__aexit__ and explicit stream closures.
  • Ensures each MCPClient instance cleans up independently without errors when multiple are active.

Why is this needed?

Closing one client previously caused errors on others due to shared cancel scopes. This PR isolates cleanup per client.

Closes #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

Comments

AltStyle によって変換されたページ (->オリジナル) /