Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Sep 14, 2024
1 parent 9f5b578 commit d8129ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exchange/_bybit_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def _connect(self):
logger.info("WebSocket connection established.")
except Exception as e:
logger.error(f"Failed to connect to WebSocket: {e}")
raise ConnectionError(e)
raise ConnectionError("Failed to connect to WebSocket") from None

@retry(
max_retries=13,
Expand Down Expand Up @@ -150,7 +150,7 @@ async def _wait_for_ws(self, timeout=10):
await asyncio.wait_for(self._check_ws_open(), timeout=timeout)
except asyncio.TimeoutError:
logger.error("Timed out waiting for WebSocket to open.")
raise ConnectionError("WebSocket connection timeout.")
raise ConnectionError("WebSocket connection timeout.") from None

async def _check_ws_open(self):
while not self.ws or not self.ws.open:
Expand Down

0 comments on commit d8129ee

Please sign in to comment.