[tor-commits] [onionperf/master] Wait for >=1 download not exactly 1 to exit the oneshot mode

irl at torproject.org irl at torproject.org
Tue Feb 26 15:20:55 UTC 2019


commit 783aea2f76bb3f60fbc29ea9d089c12a9ba8835e
Author: Ana Custura <ana at nestat.org.uk>
Date:   Mon Feb 25 13:35:20 2019 +0100

    Wait for >=1 download not exactly 1 to exit the oneshot mode
    
    In testing networks, more than one download may be completed before this
    test is reached.
---
 onionperf/measurement.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/onionperf/measurement.py b/onionperf/measurement.py
index ff26885..ce2c215 100644
--- a/onionperf/measurement.py
+++ b/onionperf/measurement.py
@@ -243,7 +243,7 @@ class Measurement(object):
                         downloads = 0
                         while True:
                             downloads = self.__get_download_count(tgen_client_writable.filename)
-                            if downloads == 1:
+                            if downloads >= 1:
                                logging.info("Onionperf has downloaded a 5M file in oneshot mode, and will now shut down.")
                                break
                         else:





More information about the tor-commits mailing list