mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Catch connection reset (#22982)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user