handle OSErrors, too

This commit is contained in:
Jakob Ketterl 2019-06-07 01:14:09 +02:00
parent 0c59caa230
commit aa7212c642

View File

@ -78,7 +78,9 @@ class WebSocketConnection(object):
self.handler.wfile.write(header)
self.handler.wfile.flush()
except ValueError:
logger.exception("while writing close frame:")
logger.exception("ValueError while writing close frame:")
except OSError:
logger.exception("OSError while writing close frame:")
try:
self.handler.finish()