Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Sep 13, 2024
1 parent 39ef728 commit d262755
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exchange/_bybit_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

connect_exceptions = (ConnectionError, ConnectionClosedError, asyncio.TimeoutError)


class BybitWS(AbstractWS):
SUBSCRIBE_OPERATION = "subscribe"
UNSUBSCRIBE_OPERATION = "unsubscribe"
Expand Down Expand Up @@ -137,6 +138,8 @@ async def _send_message(self, operation):

try:
await asyncio.wait_for(self.ws.send(json.dumps(message)), timeout=5)

logger.info(f"{operation.capitalize()} to: {message}")
except asyncio.TimeoutError:
logger.error("Subscription request timed out")
except Exception as e:
Expand Down

0 comments on commit d262755

Please sign in to comment.