handle socket timeouts

This commit is contained in:
Jakob Ketterl 2019-09-24 21:42:41 +02:00
parent b1742dafc2
commit a68ba01320

View File

@ -160,6 +160,9 @@ class WebSocketConnection(object):
logger.warning("unsupported opcode: {0}".format(opcode))
except IncompleteRead:
available = False
except TimeoutError:
logger.warning("websocket timed out; closing connection")
self.open = False
logger.debug("websocket loop ended; shutting down")