Rev2082, Log websocket receive errors

This commit is contained in:
shortcutme 2017-05-22 11:34:16 +02:00
parent 35a18bd0b2
commit 7900578077
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 7 additions and 3 deletions

View file

@ -65,9 +65,13 @@ class UiWebsocket(object):
while True:
try:
message = ws.receive()
if ws.closed:
break
else:
message = ws.receive()
except Exception, err:
return "Bye." # Close connection
self.log.error("WebSocket receive error: %s" % Debug.formatException(err))
break
if message:
try: