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: except IncompleteRead:
logger.warning("incomplete read on websocket; closing connection") logger.warning("incomplete read on websocket; closing connection")
self.open = False self.open = False
except TimeoutError: except OSError:
logger.warning("websocket timed out; closing connection") logger.exception("OSError while reading data; closing connection")
self.open = False self.open = False
logger.debug("websocket loop ended; shutting down") logger.debug("websocket loop ended; shutting down")