mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-03 18:02:33 +00:00
Merge PR #1953: fix: catch BaseException in MCP connection to handle CancelledError
fix: catch BaseException in MCP connection to handle CancelledError
This commit is contained in:
commit
aab909e936
@ -139,7 +139,7 @@ class AgentLoop:
|
||||
await self._mcp_stack.__aenter__()
|
||||
await connect_mcp_servers(self._mcp_servers, self.tools, self._mcp_stack)
|
||||
self._mcp_connected = True
|
||||
except Exception as e:
|
||||
except BaseException as e:
|
||||
logger.error("Failed to connect MCP servers (will retry next message): {}", e)
|
||||
if self._mcp_stack:
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user