[or-cvs] Explain why we only expire open connections
Peter Palfrader
weasel at seul.org
Tue Feb 14 17:30:07 UTC 2006
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25748
Modified Files:
main.c
Log Message:
Explain why we only expire open connections
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.624
retrieving revision 1.625
diff -u -p -d -r1.624 -r1.625
--- main.c 14 Feb 2006 04:23:05 -0000 1.624
+++ main.c 14 Feb 2006 17:30:04 -0000 1.625
@@ -637,6 +637,13 @@ run_connection_housekeeping(int i, time_
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).",
More information about the tor-commits
mailing list