summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2010-05-08 10:41:00 -0700
committerMike Perry <mikeperry-git@fscked.org>2010-05-10 13:11:47 -0700
commit0a6191cf701617d51d30c468b5987b62ad75883c (patch)
treecbc8aa058a261eef06bd34eed8efd2f607c68c84 /src/or/circuitbuild.c
parent728e946efd87d5cd0a9ff073eeeb7b4fe9c3c0db (diff)
downloadtor-0a6191cf701617d51d30c468b5987b62ad75883c.tar.gz
tor-0a6191cf701617d51d30c468b5987b62ad75883c.zip
Bug 1357: Store the suspended timeout value to resume.
This prevents a spurious warning where we have a timeout just after deciding our network came back online.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 0840e304f1..3600ce7c4d 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -922,17 +922,18 @@ circuit_build_times_network_check_live(circuit_build_times_t *cbt)
"Temporarily raising timeout to %lds.",
(long int)(now - cbt->liveness.network_last_live),
tor_lround(circuit_build_times_get_initial_timeout()/1000));
+ cbt->liveness.suspended_timeout = cbt->timeout_ms;
cbt->timeout_ms = circuit_build_times_get_initial_timeout();
- cbt->liveness.net_suspended = 1;
control_event_buildtimeout_set(cbt, BUILDTIMEOUT_SET_EVENT_SUSPENDED);
}
return 0;
- } else if (cbt->liveness.net_suspended) {
+ } else if (cbt->liveness.suspended_timeout) {
log_notice(LD_CIRC,
"Network activity has resumed. "
"Resuming circuit timeout calculations.");
- cbt->liveness.net_suspended = 0;
+ cbt->timeout_ms = cbt->liveness.suspended_timeout;
+ cbt->liveness.suspended_timeout = 0;
control_event_buildtimeout_set(cbt, BUILDTIMEOUT_SET_EVENT_RESUME);
}