mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
refactor: Asyncio timeoutError update
This commit is contained in:
@@ -234,7 +234,7 @@ async def create_client(
|
|||||||
|
|
||||||
await protocol.on_message(ws, name, message)
|
await protocol.on_message(ws, name, message)
|
||||||
|
|
||||||
except (asyncio.TimeoutError, websockets.exceptions.WebSocketException):
|
except (TimeoutError, websockets.exceptions.WebSocketException):
|
||||||
# Try pinging
|
# Try pinging
|
||||||
try:
|
try:
|
||||||
pong = await ws.ping()
|
pong = await ws.ping()
|
||||||
@@ -244,7 +244,7 @@ async def create_client(
|
|||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
except asyncio.TimeoutError:
|
except TimeoutError:
|
||||||
logger.error(f"Ping timed out, retrying in {sleep_time}s")
|
logger.error(f"Ping timed out, retrying in {sleep_time}s")
|
||||||
await asyncio.sleep(sleep_time)
|
await asyncio.sleep(sleep_time)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user