From b80c7b67000405bc68c203f93c7a91afc9558da5 Mon Sep 17 00:00:00 2001 From: Benjamin Braatz Date: Tue, 21 Sep 2021 21:24:11 +0200 Subject: [PATCH] Catch TimeoutError. --- controlpi_plugins/wsclient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controlpi_plugins/wsclient.py b/controlpi_plugins/wsclient.py index f0a2263..233816c 100644 --- a/controlpi_plugins/wsclient.py +++ b/controlpi_plugins/wsclient.py @@ -1,4 +1,5 @@ import asyncio +import concurrent.futures import fcntl import json import socket @@ -196,6 +197,6 @@ class WSClient(BasePlugin): await self.bus.send(Message(self.name, {'event': 'connection closed'})) - except (OSError, InvalidMessage): + except (OSError, InvalidMessage, concurrent.futures.TimeoutError): pass await asyncio.sleep(1) -- 2.34.1