fix: stabilize gitlab resolver in saas

This commit is contained in:
hieptl
2025-12-30 18:53:00 +07:00
parent d5e83d0f06
commit cc28119dc7

View File

@@ -426,7 +426,16 @@ class WebSession:
)
_waiting_times += 1
await asyncio.sleep(sleep_duration)
self._wait_websocket_initial_complete = False
# Only disable wait flag if a client actually connected
# This ensures subsequent events will wait again if no client connected yet
if bool(
self.sio.manager.rooms.get('/', {}).get(
ROOM_KEY.format(sid=self.sid)
)
):
self._wait_websocket_initial_complete = False
await self.sio.emit('oh_event', data, to=ROOM_KEY.format(sid=self.sid))
await asyncio.sleep(0.001) # This flushes the data to the client