diff --git a/pyVoIP/sock/sock.py b/pyVoIP/sock/sock.py index bb2cd4f..8a9f4ff 100644 --- a/pyVoIP/sock/sock.py +++ b/pyVoIP/sock/sock.py @@ -89,6 +89,7 @@ def recv(self, nbytes: int, timeout=0, peak=False) -> bytes: return self._udp_recv(nbytes, timeout, peak) def _tcp_tls_recv(self, nbytes: int, timeout=0, peak=False) -> bytes: + timeout = time.monotonic() + timeout if timeout else math.inf # TODO: Timeout msg = None while not msg and not self.sock.SD: