summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-02-14 17:30:04 +0000
committerPeter Palfrader <peter@palfrader.org>2006-02-14 17:30:04 +0000
commit0bab094d5d50608a21e69e23c554c2e858f51461 (patch)
tree125bc78647afe58d7c75d8294932d9d9e8d908d5
parentae249fc5a377d1e088ec18b9ae1053f3eb9050aa (diff)
downloadtor-0bab094d5d50608a21e69e23c554c2e858f51461.tar.gz
tor-0bab094d5d50608a21e69e23c554c2e858f51461.zip
Explain why we only expire open connections
svn:r6015
-rw-r--r--src/or/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 66f70396b3..83413da79f 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -637,6 +637,13 @@ run_connection_housekeeping(int i, time_t now)
if (best && best != conn &&
(conn->state == OR_CONN_STATE_OPEN ||
now > conn->timestamp_created + TLS_TIMEOUT)) {
+ /* We only mark as obsolete connections that already are in
+ * OR_CONN_STATE_OPEN, i.e. that have finished their TLS handshaking.
+ * This is necessay because authorities judge whether a router is
+ * reachable based on whether they were able to TLS handshake with it
+ * recently. Without this check we would expire connections too
+ * early for router->last_reachable to be updated.
+ */
log_info(LD_OR,
"Marking duplicate conn to %s:%d obsolete "
"(fd %d, %d secs old).",