[tor-commits] [ooni-probe/master] Set the measurement timeout to the timeout of the nettest + 8 to avoid triggering the measurement timeout before the nettest one.
art at torproject.org
art at torproject.org
Mon Sep 22 20:30:50 UTC 2014
commit ba2a9f6c9d3276994d3a8f315541ae49297dd355
Author: Arturo Filastò <art at fuffa.org>
Date: Sat Sep 13 21:00:27 2014 -0400
Set the measurement timeout to the timeout of the nettest + 8 to avoid triggering the measurement timeout before the nettest one.
---
ooni/tasks.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ooni/tasks.py b/ooni/tasks.py
index 650e0b0..9d281ab 100644
--- a/ooni/tasks.py
+++ b/ooni/tasks.py
@@ -118,7 +118,11 @@ class Measurement(TaskWithTimeout):
if 'timeout' in dir(test_instance):
if isinstance(test_instance.timeout, int) or isinstance(test_instance.timeout, float):
- self.timeout = test_instance.timeout
+ # If the test has a timeout option set we set the measurement
+ # timeout to that value + 8 seconds to give it enough time to
+ # trigger it's internal timeout before we start trigger the
+ # measurement timeout.
+ self.timeout = test_instance.timeout + 8
elif config.advanced.measurement_timeout:
self.timeout = config.advanced.measurement_timeout
TaskWithTimeout.__init__(self)
More information about the tor-commits
mailing list