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