|
@@ -126,8 +126,10 @@ class AgentSession:
|
|
|
def close(self):
|
|
def close(self):
|
|
|
"""Closes the Agent session"""
|
|
"""Closes the Agent session"""
|
|
|
self._closed = True
|
|
self._closed = True
|
|
|
|
|
+
|
|
|
def inner_close():
|
|
def inner_close():
|
|
|
asyncio.run(self._close())
|
|
asyncio.run(self._close())
|
|
|
|
|
+
|
|
|
asyncio.get_event_loop().run_in_executor(None, inner_close)
|
|
asyncio.get_event_loop().run_in_executor(None, inner_close)
|
|
|
|
|
|
|
|
async def _close(self):
|
|
async def _close(self):
|
|
@@ -142,7 +144,6 @@ class AgentSession:
|
|
|
if self.security_analyzer is not None:
|
|
if self.security_analyzer is not None:
|
|
|
await self.security_analyzer.close()
|
|
await self.security_analyzer.close()
|
|
|
|
|
|
|
|
-
|
|
|
|
|
def _create_security_analyzer(self, security_analyzer: str | None):
|
|
def _create_security_analyzer(self, security_analyzer: str | None):
|
|
|
"""Creates a SecurityAnalyzer instance that will be used to analyze the agent actions
|
|
"""Creates a SecurityAnalyzer instance that will be used to analyze the agent actions
|
|
|
|
|
|