mirror of
https://github.com/open-webui/mcpo.git
synced 2026-11-05 01:27:39 +00:00
[PR #298] Handle cancelled MCP session operations #246
Labels
No labels
bug
can't reproduce
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/mcpo#246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/mcpo/pull/298
Author: @dongyikuan919
Created: 6/13/2026
Status: 🔄 Open
Base:
main← Head:codex/handle-cancelled-mcp-session📝 Commits (1)
84f3b47Handle cancelled MCP session operations📊 Changes
3 files changed (+130 additions, -8 deletions)
View changed files
📝
src/mcpo/main.py(+7 -7)📝
src/mcpo/tests/test_main.py(+71 -1)📝
src/mcpo/utils/main.py(+52 -0)📄 Description
Summary
Fixes part of the stale/zombie MCP session behavior described in #90 by handling
asyncio.CancelledErrorduring MCP session operations instead of letting it escape the request path.Changes:
CancelledErrorwhile unwinding partially opened sessions/transportsHTTPExceptiondetails from tool errors instead of wrapping them asUnexpected errorValidation
python -m py_compile src/mcpo/main.py src/mcpo/utils/main.py src/mcpo/tests/test_main.pypython -m pytest src/mcpo/tests/test_main.py-> 18 passedI also attempted the broader test run through
uv run, but dependency installation failed while fetchinghttps://pypi.org/simple/cryptography/due to a network timeout in this environment.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.