mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-08 22:38:05 -05:00
ALL-4636 Resolution for connection leaks (#12144)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -510,6 +510,10 @@ async def delete_conversation(
|
||||
if v1_result is not None:
|
||||
return v1_result
|
||||
|
||||
# Close connections
|
||||
await db_session.close()
|
||||
await httpx_client.aclose()
|
||||
|
||||
# V0 conversation logic
|
||||
return await _delete_v0_conversation(conversation_id, user_id)
|
||||
|
||||
@@ -551,11 +555,8 @@ async def _try_delete_v1_conversation(
|
||||
httpx_client,
|
||||
)
|
||||
)
|
||||
except (ValueError, TypeError):
|
||||
# Not a valid UUID, continue with V0 logic
|
||||
pass
|
||||
except Exception:
|
||||
# Some other error, continue with V0 logic
|
||||
# Continue with V0 logic
|
||||
pass
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user