2 Commits

Author SHA1 Message Date
roboomp 6d17c85323 fix(mcp): reject initial tools/list failure before close
Detached and dropped the connection synchronously, then closed the transport in the background, so a slow or hung close no longer keeps the tool-load promise pending past the startup race and no longer strands pending state that skips future connects.

Applied the same reject-fast teardown to the stale initial-connect and reconnect bailouts.

Fixes #8112
2026-08-09 23:55:17 +00:00
roboomp 5802aa78b4 fix(mcp): closed stale initial connections
Closed late initial connection results before callback wiring and removed unhealthy connections after initial tools/list failures.

Centralized identity-safe transport disposal so stale cleanup cannot delete a newer connection for the same server.

Fixes #8112
2026-08-09 23:47:51 +00:00