Skip to content

Log MCP client close errors instead of silently swallowing them - #145

Open
OpenGithubs wants to merge 1 commit into
CopilotKit:mainfrom
OpenGithubs:fix-close-log
Open

OpenGithubs wants to merge 1 commit into
CopilotKit:mainfrom
OpenGithubs:fix-close-log

Conversation

@OpenGithubs

Copy link
Copy Markdown

Summary

Bug fix: client.close() failures in the MCP and Parallel web-search transports were completely swallowed with .catch(() => {}). This masked transport leaks and connection errors in production — operators had zero visibility into why MCP connections accumulated or refused to close cleanly.

Changes

  • src/server/connections.ts: log close() failure reason
  • src/server/parallel.ts: log close() failure reason

Commits

  • fix-close-log fix: log MCP client close errors instead of silently swallowing them

client.close() failures were completely suppressed with an empty catch. This
masked MCP connection leaks and transport errors in server logs. Now we log
the failure reason so operators can diagnose stuck connections.
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.

1 participant