summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-12-11 11:23:36 +0000
committerRoger Dingledine <arma@torproject.org>2005-12-11 11:23:36 +0000
commit9c01fa3d5981ada2f664f65b8437b4cbeb4d202b (patch)
tree20f99712de87664cdd3bb9a5ec7c4f5653151116
parentf3349d6ed3b61899c30f55d9852555d95818c0f0 (diff)
downloadtor-9c01fa3d5981ada2f664f65b8437b4cbeb4d202b.tar.gz
tor-9c01fa3d5981ada2f664f65b8437b4cbeb4d202b.zip
fix yet another time comparison bug. we were abandoning helpers
as soon as they became unavailable. (is this true?) svn:r5565
-rw-r--r--src/or/circuitbuild.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8ac40d9956..dc5a02d1ad 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1751,10 +1751,12 @@ remove_dead_helpers(void)
helper_node_t *helper = smartlist_get(helper_nodes, i);
const char *why = NULL;
time_t since = 0;
- if (helper->unlisted_since + HELPER_ALLOW_UNLISTED > now) {
+ if (helper->unlisted_since &&
+ helper->unlisted_since + HELPER_ALLOW_UNLISTED < now) {
why = "unlisted";
since = helper->unlisted_since;
- } else if (helper->down_since + HELPER_ALLOW_DOWNTIME > now) {
+ } else if (helper->down_since &&
+ helper->down_since + HELPER_ALLOW_DOWNTIME < now) {
why = "down";
since = helper->down_since;
}