diff --git a/pytest_mqtt/util.py b/pytest_mqtt/util.py index dd9d856..005f62e 100644 --- a/pytest_mqtt/util.py +++ b/pytest_mqtt/util.py @@ -15,6 +15,7 @@ def probe_tcp_connect(host: str, port: int) -> bool: https://github.com/lovelysystems/lovely.testlayers/blob/0.7.0/src/lovely/testlayers/util.py#L6-L13 """ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.settimeout(0.1) ex = s.connect_ex((host, port)) if ex == 0: s.close()