sane-ip-check: add a delay in the retry path

This commit is contained in:
2024-07-28 03:24:02 +00:00
parent c83dc4d601
commit cb1fbdcaf0

View File

@@ -52,6 +52,7 @@ def get_fault_tolerant(try_upnp: bool, retry_duration: float) -> tuple[str|None,
logger.warn(e)
if time.time() - start > retry_duration:
raise
time.sleep(1.0)
def main(format: str, try_upnp: bool, retry_duration: float, expect: str|None) -> None:
root_dev, wan_ip = get_fault_tolerant(try_upnp, retry_duration)