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