catch more generic OSError

This commit is contained in:
Jakob Ketterl 2019-10-03 00:58:27 +02:00
parent 6ae934e461
commit 2025ccb366

View File

@ -189,8 +189,8 @@ class WebSocketConnection(object):
except IncompleteRead:
logger.warning("incomplete read on websocket; closing connection")
self.open = False
except TimeoutError:
logger.warning("websocket timed out; closing connection")
except OSError:
logger.exception("OSError while reading data; closing connection")
self.open = False
logger.debug("websocket loop ended; shutting down")