mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
generic_websocket: add optimization comment
This commit is contained in:
committed by
Jacob Plaster
parent
2cde664359
commit
972e05eacd
@@ -147,6 +147,8 @@ class GenericWebsocket:
|
||||
self.logger.info("Websocket connected to {}".format(self.host))
|
||||
retries = 0
|
||||
while True:
|
||||
# optimization - wait 0 seconds to force the async queue
|
||||
# to be cleared before continuing
|
||||
await asyncio.sleep(0)
|
||||
message = await websocket.recv()
|
||||
await self.on_message(sId, message)
|
||||
|
||||
Reference in New Issue
Block a user