aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-11 22:34:07 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-11 22:34:07 +0000
commit54a7285e99e052702103b7988cd084759b138e15 (patch)
tree4d5529cd9bc0acb26930eb75787f7a89b158be75 /src/or/main.c
parentc562ca494ab0a2a2c3ac1976b033ff5a46417914 (diff)
downloadtor-54a7285e99e052702103b7988cd084759b138e15.tar
tor-54a7285e99e052702103b7988cd084759b138e15.tar.gz
oh hey. we were hanging up on every tor client because he
was obsolete as soon as he started. big oops. svn:r5807
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/or/main.c b/src/or/main.c
index a49ad5d2d..4914bd262 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -625,13 +625,16 @@ run_connection_housekeeping(int i, time_t now)
conn->address, conn->port, conn->s,
(int)(now - conn->timestamp_created));
conn->is_obsolete = 1;
- } else if (connection_or_get_by_identity_digest(conn->identity_digest) !=
- conn) {
- info(LD_OR,
- "Marking duplicate conn to %s:%d obsolete (fd %d, %d secs old).",
- conn->address, conn->port, conn->s,
- (int)(now - conn->timestamp_created));
- conn->is_obsolete = 1;
+ } else {
+ connection_t *best =
+ connection_or_get_by_identity_digest(conn->identity_digest);
+ if (best && best != conn) {
+ info(LD_OR,
+ "Marking duplicate conn to %s:%d obsolete (fd %d, %d secs old).",
+ conn->address, conn->port, conn->s,
+ (int)(now - conn->timestamp_created));
+ conn->is_obsolete = 1;
+ }
}
}