[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [chutney/master] TorNet: Recalculate elapsed time as needed
commit d0ac1c6f1a5346dd6aecca053fba1920632ef4dd
Author: teor <teor@xxxxxxxxxxxxxx>
Date: Mon Mar 16 15:50:14 2020 +1000
TorNet: Recalculate elapsed time as needed
chutney was calculating some elapsed times incorrectly, leading to longer
wait times for network bootstrap.
Bugfix on 33615.
---
lib/chutney/TorNet.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 73e21f4..9857968 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -2264,6 +2264,7 @@ class Network(object):
print("Waiting {} seconds for other dir info to sync...\n"
.format(int(wait_time)))
time.sleep(wait_time)
+ now = time.time()
elapsed = now - start
# Wait for a minimum amount of run time, to avoid a race
@@ -2283,6 +2284,7 @@ class Network(object):
print(("Waiting another {} seconds for legacy tor "
"microdesc downloads...\n").format(int(sleep_time)))
time.sleep(sleep_time)
+ now = time.time()
elapsed = now - start
return True
if now >= limit:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits