diff --git a/vibora/utils.py b/vibora/utils.py index 83c70b8..16d13b7 100644 --- a/vibora/utils.py +++ b/vibora/utils.py @@ -131,9 +131,12 @@ def wait_server_available(host: str, port: int, timeout: int=10) -> None: :param port: TCP port used to connect. :return: """ - sock = socket.socket() - sock.settimeout(timeout) while timeout > 0: + """ Start of change """ + sock = socket.socket() + sock.settimeout(timeout) + """ End of change """ + start_time = time.time() try: sock.connect((host, port))