Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/uipath/_cli/_chat/_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ async def disconnect(self) -> None:
return

try:
# Request disconnect then wait for it to happen, this allows pending sends to complete. Without the wait,
# sending the endExchange event was racing with process termination, and losing much of the time.
await self._client.disconnect()
await self._client.wait()
except Exception as e:
logger.error(f"Error during WebSocket disconnect: {e}")
finally:
Expand Down