Skip to content

Commit

Permalink
Fix logs in exception catcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Insoleet committed Jan 31, 2016
1 parent d54e07e commit 8c02304
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sakia/core/net/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def jsonify(self):
def close_ws(self):
for ws in self._ws_connection.values():
if ws:
asyncio.wait_for(ws.close(), timeout=15)
asyncio.as_completed(ws.close(), timeout=15)

@property
def pubkey(self):
Expand Down
9 changes: 5 additions & 4 deletions src/sakia/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ def async_exception_handler(loop, context):
for ignored in ("Unclosed", "socket.gaierror"):
if ignored in line:
return
for line in traceback.format_exception(*exc_info):
for ignored in ("Unclosed", "socket.gaierror"):
if ignored in line:
return
if exc_info:
for line in traceback.format_exception(*exc_info):
for ignored in ("Unclosed", "socket.gaierror"):
if ignored in line:
return
os._exit(1)


Expand Down

0 comments on commit 8c02304

Please sign in to comment.