We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01e0719 commit dba5978Copy full SHA for dba5978
1 file changed
src/agentlab/backends/browser/mcp.py
@@ -134,9 +134,12 @@ def actions(self) -> tuple[ToolSpec]:
134
for tool in self.tools.values()
135
)
136
137
- async def close(self) -> None:
+ async def aclose(self) -> None:
138
await self.exit_stack.aclose()
139
140
+ def close(self) -> None:
141
+ self.loop.run_until_complete(self.aclose())
142
+
143
144
class MCPBrowserBackend(BrowserBackend):
145
config_path: str
@@ -166,4 +169,7 @@ def actions(self) -> tuple[ToolSpec]:
166
169
return list(self._mcp.actions())
167
170
168
171
def close(self) -> None:
- self._mcp.close()
172
+ try:
173
+ self._mcp.close()
174
+ except Exception:
175
+ pass
0 commit comments