diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2009-10-07 12:24:40 -0700 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2009-10-07 12:24:40 -0700 |
commit | b918cd8f04c255af37b1eae7434577579f44f9bc (patch) | |
tree | 2ccf6b6fbeeeb5b766757c30345af14dfb7e5b45 | |
parent | b4e0d09202b75b7e6a555a2db3d7a77120eec7b3 (diff) | |
download | tor-b918cd8f04c255af37b1eae7434577579f44f9bc.tar.gz tor-b918cd8f04c255af37b1eae7434577579f44f9bc.zip |
Remove another overzealous assert.
Pretimeouts may have build time data, just no timeout data.
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index e462ac2398..46b1b3ca74 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -162,7 +162,7 @@ circuit_build_times_init(circuit_build_times_t *cbt) } /** - * Rewind our timeout history by n positions. + * Rewind our timeout history by n timeout positions. */ static void circuit_build_times_rewind_history(circuit_build_times_t *cbt, int n) @@ -170,6 +170,8 @@ circuit_build_times_rewind_history(circuit_build_times_t *cbt, int n) int i = 0; if (cbt->pre_timeouts) { + /* If we have pre-timeouts, it means we're not yet storing + * timeouts in our normal array. Only rewind the counter. */ if (cbt->pre_timeouts > n) { cbt->pre_timeouts -= n; } else { @@ -180,8 +182,6 @@ circuit_build_times_rewind_history(circuit_build_times_t *cbt, int n) "Pre-timeouts: %d", n, cbt->build_times_idx, cbt->total_build_times, cbt->pre_timeouts); - tor_assert(cbt->build_times_idx == 0); - tor_assert(cbt->total_build_times == 0); return; } |