
commit 2e665358be47c8e318e61c08b645b6233d77249e Author: teor (Tim Wilson-Brown) <teor2345@gmail.com> Date: Thu Jul 28 15:43:14 2016 +1000 Wait 5 seconds between data retries This also improves chutney success rates on slow machines. And fix a typo. --- lib/chutney/Traffic.py | 6 +++--- scripts/chutney_tests/verify.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/chutney/Traffic.py b/lib/chutney/Traffic.py index 881cac7..b5f75fd 100644 --- a/lib/chutney/Traffic.py +++ b/lib/chutney/Traffic.py @@ -292,11 +292,11 @@ class Source(Peer): debug("BUG: sent no bytes") self._sent_no_bytes += 1 # We can't retry too fast, otherwise clients burn all their HSDirs - if self._sent_no_bytes >= 3: - print("Send no data %d times. Stalled." % + if self._sent_no_bytes >= 2: + print("Sent no data %d times. Stalled." % (self._sent_no_bytes)) return -1 - time.sleep(3) + time.sleep(5) self.outbuf = self.outbuf[n:] if self.state == self.CONNECTING_THROUGH_PROXY: return 1 # Keep us around. diff --git a/scripts/chutney_tests/verify.py b/scripts/chutney_tests/verify.py index ac601c9..67ca642 100644 --- a/scripts/chutney_tests/verify.py +++ b/scripts/chutney_tests/verify.py @@ -16,7 +16,7 @@ def run_test(network): status = _verify_traffic(network) # Avoid madly spewing output if we fail immediately each time if not status: - time.sleep(2) + time.sleep(5) print("Transmission: %s" % ("Success" if status else "Failure")) if not status: # TODO: allow the debug flag to be passed as an argument to