Skip to content

Commit

Permalink
Some python versions raise TimeoutError instead of socket.timeout...
Browse files Browse the repository at this point in the history
  • Loading branch information
ocket8888 committed Aug 7, 2018
1 parent dbb1a17 commit 50e033d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connvitals/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def recv(self) -> float:

try:
pkt, addr = self.sock.recvfrom(100+len(self.payload))
except socket.timeout:
except (socket.timeout, TimeoutError):
return -1

# The packet must have actually come from the host we pinged
Expand Down

0 comments on commit 50e033d

Please sign in to comment.