[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 783aea2f76bb3f60fbc29ea9d089c12a9ba8835e
Author: Ana Custura <ana@xxxxxxxxxxxxx>
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:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits