diff --git a/connvitals/ping.py b/connvitals/ping.py index 006d641..a3860f8 100644 --- a/connvitals/ping.py +++ b/connvitals/ping.py @@ -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