mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Catch connection reset (#22982)
This commit is contained in:
parent
e9d9861bda
commit
373b2009c9
@ -53,7 +53,8 @@ class WebSocketHandler:
|
||||
async def _writer(self):
|
||||
"""Write outgoing messages."""
|
||||
# Exceptions if Socket disconnected or cancelled by connection handler
|
||||
with suppress(RuntimeError, *CANCELLATION_ERRORS):
|
||||
with suppress(RuntimeError, ConnectionResetError,
|
||||
*CANCELLATION_ERRORS):
|
||||
while not self.wsock.closed:
|
||||
message = await self._to_write.get()
|
||||
if message is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user