mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
Fix issue where an exception is raised because we try to finish a thread that was never started (#4200)
This commit is contained in:
@@ -144,7 +144,9 @@ class AgentSession:
|
||||
await self.security_analyzer.close()
|
||||
|
||||
self.loop.call_soon_threadsafe(self.loop.stop)
|
||||
self.thread.join()
|
||||
if self.thread:
|
||||
# We may be closing an agent_session that was never actually started
|
||||
self.thread.join()
|
||||
|
||||
self._closed = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user