mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
* fix: await MCP server initialization before returning McpHub instance MCP tools were unavailable on the first task turn when started via IPC because McpHub's constructor fired initializeGlobalMcpServers() and initializeProjectMcpServers() without awaiting them. getInstance() returned a hub with servers still in "connecting" state. Store the combined initialization promise and expose waitUntilReady(), then await it in McpServerManager.getInstance() so the hub is only returned after all servers have connected or timed out. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: assign McpHub instance only after waitUntilReady() resolves Closes race condition where concurrent callers of getInstance() could receive a hub that has not finished initialization. The hub is now created in a local variable and only assigned to this.instance after waitUntilReady() completes. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Roo Code <roomote@roocode.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| McpHub.ts | ||
| McpServerManager.ts | ||