Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions binance/ws/depthcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,8 @@ async def __aexit__(self, *args, **kwargs):
await self._socket.__aexit__(*args, **kwargs)

async def recv(self):
dc = None
while not dc:
try:
res = await asyncio.wait_for(self._socket.recv(), timeout=self.TIMEOUT)
except Exception as e:
self._log.warning(e)
else:
dc = await self._depth_event(res)
return dc
res = await asyncio.wait_for(self._socket.recv(), timeout=self.TIMEOUT)
return await self._depth_event(res)

async def _init_cache(self):
"""Initialise the depth cache calling REST endpoint
Expand Down