aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2008-11-05 10:40:29 +0000
committerKarsten Loesing <karsten.loesing@gmx.net>2008-11-05 10:40:29 +0000
commitb31e2c2491951c10e1e53d4d0cc32a3ac728e279 (patch)
tree8fc45026ec4ee9d149e3d0b5c47ee36e0ee16f36 /src
parent73c6cb8353355d5895b67252ac28489428263875 (diff)
downloadtor-b31e2c2491951c10e1e53d4d0cc32a3ac728e279.tar
tor-b31e2c2491951c10e1e53d4d0cc32a3ac728e279.tar.gz
(a - b) / 2 != a - (b / 2); this is the reason why tunneled directory requests and client-side introduction circuits don't time out after the intended 30 seconds (task #847). Bugfix on r17106. Found by miner.
svn:r17189
Diffstat (limited to 'src')
-rw-r--r--src/or/circuituse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 14acbf5e6..f4ea3e8d8 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -268,8 +268,8 @@ circuit_expire_building(time_t now)
{
circuit_t *victim, *circ = global_circuitlist;
time_t general_cutoff = now - get_options()->CircuitBuildTimeout;
- time_t begindir_cutoff = general_cutoff/2;
- time_t introcirc_cutoff = general_cutoff/2;
+ time_t begindir_cutoff = now - get_options()->CircuitBuildTimeout/2;
+ time_t introcirc_cutoff = begindir_cutoff;
cpath_build_state_t *build_state;
while (circ) {