Skip to content

Commit

Permalink
Rev2082, Log websocket receive errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed May 22, 2017
1 parent 35a18bd commit 7900578
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config(object):

def __init__(self, argv):
self.version = "0.5.5"
self.rev = 2081
self.rev = 2082
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"
Expand Down
8 changes: 6 additions & 2 deletions src/Ui/UiWebsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ def start(self):

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:
Expand Down

0 comments on commit 7900578

Please sign in to comment.