mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
better error handling channel send
This commit is contained in:
parent
55bf195bfb
commit
2dc55e89e6
|
@ -78,11 +78,12 @@ class WebSocketChannel:
|
|||
self.queue.put(data),
|
||||
timeout=self.drain_timeout
|
||||
)
|
||||
return True
|
||||
except Exception:
|
||||
# We must catch any exception here to prevent an exception bubbling
|
||||
# up and stalling the broadcast thread
|
||||
except asyncio.TimeoutError:
|
||||
return False
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
return True
|
||||
|
||||
async def recv(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user