Skip to content

Fix MCP calls hanging after connection owner exits#596

Merged
duguwanglong merged 2 commits into
devfrom
fix/mcp-owner-exit-unblocks-call
Jul 22, 2026
Merged

Fix MCP calls hanging after connection owner exits#596
duguwanglong merged 2 commits into
devfrom
fix/mcp-owner-exit-unblocks-call

Conversation

@xiami762

@xiami762 xiami762 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • wait for either the MCP command response or the connection owner task
  • fail immediately with the connection root cause when the owner exits first
  • cancel the pending response future when the caller is interrupted
  • add regression coverage for HTTP 504 owner failures and caller cancellation

Testing

  • uv run pytest -q tests/mcp tests/tool/test_delegate_task_compat.py tests/session/test_session_abort_inject.py::TestAbortPropagation::test_session_loop_run_publishes_busy_and_idle_status_events (147 passed)
  • uv run ruff check flocks/mcp/client.py tests/mcp/test_mcp_client.py

@duguwanglong
duguwanglong merged commit ae0d727 into dev Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants