cleanup: spread websocket.

This commit is contained in:
Adeel Khan committed 2025-08-25 11:45:57 +00:00
1 parent 8f0784e6c2
commit 8569b02f5c
1 file changed
+3 -2
@@ -1021,10 +1021,11 @@ class BybitMdProvider(MdProvider):
await asyncio.sleep(30) # Check every 30 seconds
if not self.stop_event.is_set():
monitor_count += 1
if websocket.open:
# if websocket.open:
if websocket.state == 1: # State.OPEN
logger.debug(f"Spread WebSocket connection is healthy (check #{monitor_count})")
else:
logger.warning(f"Spread WebSocket connection is closed (check #{monitor_count})")
logger.warning(f"Spread WebSocket connection state: {websocket.state} (check #{monitor_count})")
break
except asyncio.CancelledError:
logger.debug("Spread connection monitor task cancelled")