Skip to content

Commit

Permalink
update exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
wijowa committed Jul 9, 2020
1 parent a46f95d commit 23aa672
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bztcp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def recv(self):
return Message.from_bytes(line + BZ_EOT)

# Buffer more data if not.
buf = self._sock.recv(4096)
try:
buf = self._sock.recv(4096)
except ConnectionResetError:
return None

if not buf:
return None
Expand Down

0 comments on commit 23aa672

Please sign in to comment.