Do not wait before updating IPs for the first time (#51)

This commit is contained in:
Zachary Milonas 2021-04-11 15:44:18 +02:00 committed by GitHub
parent 458559d52c
commit 1a6ffc9681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,11 +197,11 @@ if __name__ == '__main__':
next_time = time.time() next_time = time.time()
killer = GracefulExit() killer = GracefulExit()
prev_ips = None prev_ips = None
while True: while True:
updateIPs(getIPs())
if killer.kill_now.wait(delay): if killer.kill_now.wait(delay):
break break
updateIPs(getIPs())
else: else:
print("❓ Unrecognized parameter '" + sys.argv[1] + "'. Stopping now.") print("❓ Unrecognized parameter '" + sys.argv[1] + "'. Stopping now.")
else: else:
updateIPs(getIPs()) updateIPs(getIPs())