diff options
-rwxr-xr-x | rtr-origin/rtr-origin.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rtr-origin/rtr-origin.py b/rtr-origin/rtr-origin.py index 6cf1e9e1..97cf4f29 100755 --- a/rtr-origin/rtr-origin.py +++ b/rtr-origin/rtr-origin.py @@ -1442,8 +1442,11 @@ def client_main(argv): else: client.push_pdu(serial_query(serial = client.current_serial, nonce = client.current_nonce)) wakeup = time.time() + 600 - while wakeup > time.time(): - asyncore.loop(timeout = wakeup - time.time(), count = 1) + while True: + remaining = wakeup - time.time() + if remaining < 0: + break + asyncore.loop(timeout = remaining, count = 1) except KeyboardInterrupt: sys.exit(0) |