mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08: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:
parent
152f99c64f
commit
ee6a1cf334
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user