summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2009-09-20 18:20:10 -0700
committerMike Perry <mikeperry-git@fscked.org>2009-09-20 18:20:10 -0700
commit134266b984ae7a3f591a62cc0328fda270e1885c (patch)
tree8fdb7fcedf6e8553f657501e2efea2b043abcae3 /src/or/test.c
parente2cc4e353a73595aebd13ba89cc8b057a6242b27 (diff)
downloadtor-134266b984ae7a3f591a62cc0328fda270e1885c.tar.gz
tor-134266b984ae7a3f591a62cc0328fda270e1885c.zip
Change the condition on the nonlive timeout counting.
Try to clarify things in the comment too.
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/test.c b/src/or/test.c
index c2e34013b3..27ecc4757e 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -3525,11 +3525,13 @@ test_circuit_timeout(void)
test_assert(!circuit_build_times_network_check_live(&final));
for ( ; i < NETWORK_NONLIVE_DISCARD_COUNT; i++) {
- if (circuit_build_times_add_timeout(&estimate, 0, approx_time()))
+ if (circuit_build_times_add_timeout(&estimate, 0,
+ approx_time()-estimate.timeout_ms/1000.0-1))
estimate.have_computed_timeout = 1;
if (i < NETWORK_NONLIVE_DISCARD_COUNT-1) {
- if (circuit_build_times_add_timeout(&final, 0, approx_time()))
+ if (circuit_build_times_add_timeout(&final, 0,
+ approx_time()-final.timeout_ms/1000.0-1))
final.have_computed_timeout = 1;
}
}