Skip to content

Commit

Permalink
Capture connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Booth committed Mar 6, 2021
1 parent ac6ccbf commit 22cd5d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aiorpcx/rawsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from aiorpcx.util import NetAddress


class ConnectionLostError(Exception):
class ConnectionLostError(ConnectionError):
pass


Expand Down
2 changes: 2 additions & 0 deletions aiorpcx/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ async def _process_messages(self, recv_message):
except MemoryError as e:
self.logger.warning(f'{e!r}')
continue
except ConnectionError:
return

self.last_recv = time.time()
self.recv_count += 1
Expand Down

0 comments on commit 22cd5d8

Please sign in to comment.