summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-04-25 17:24:16 +0000
committerRoger Dingledine <arma@torproject.org>2005-04-25 17:24:16 +0000
commit4fafa81f329d296f0dcc9b0f3e5cb575d5fc9150 (patch)
tree37bf293844ec22f3c54fc3eb07d089cfc46872ec
parent662cfc976dc6d99c6e3e6f5d7664866cd58d48cc (diff)
downloadtor-4fafa81f329d296f0dcc9b0f3e5cb575d5fc9150.tar.gz
tor-4fafa81f329d296f0dcc9b0f3e5cb575d5fc9150.zip
help debug: when we close a conn due to timeout, tell us its
file descriptor, not its connectionarray index. svn:r4113
-rw-r--r--src/or/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/main.c b/src/or/main.c
index b0d4252961..d34770faa4 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -568,27 +568,27 @@ static void run_connection_housekeeping(int i, time_t now) {
now >= conn->timestamp_lastwritten + options->KeepalivePeriod) {
routerinfo_t *router = router_get_by_digest(conn->identity_digest);
if (!connection_state_is_open(conn)) {
- log_fn(LOG_INFO,"Expiring non-open OR connection to %d (%s:%d).",
- i,conn->address, conn->port);
+ log_fn(LOG_INFO,"Expiring non-open OR connection to fd %d (%s:%d).",
+ conn->s,conn->address, conn->port);
connection_mark_for_close(conn);
conn->hold_open_until_flushed = 1;
} else if (we_are_hibernating() && !circuit_get_by_conn(conn) &&
!buf_datalen(conn->outbuf)) {
- log_fn(LOG_INFO,"Expiring non-used OR connection to %d (%s:%d) [Hibernating or exiting].",
- i,conn->address, conn->port);
+ log_fn(LOG_INFO,"Expiring non-used OR connection to fd %d (%s:%d) [Hibernating or exiting].",
+ conn->s,conn->address, conn->port);
connection_mark_for_close(conn);
conn->hold_open_until_flushed = 1;
} else if (!clique_mode(options) && !circuit_get_by_conn(conn) &&
(!router || !server_mode(options) || !router_is_clique_mode(router))) {
- log_fn(LOG_INFO,"Expiring non-used OR connection to %d (%s:%d) [Not in clique mode].",
- i,conn->address, conn->port);
+ log_fn(LOG_INFO,"Expiring non-used OR connection to fd %d (%s:%d) [Not in clique mode].",
+ conn->s,conn->address, conn->port);
connection_mark_for_close(conn);
conn->hold_open_until_flushed = 1;
} else if (
now >= conn->timestamp_lastempty + options->KeepalivePeriod*10 &&
now >= conn->timestamp_lastwritten + options->KeepalivePeriod*10) {
- log_fn(LOG_NOTICE,"Expiring stuck OR connection to %d (%s:%d). (%d bytes to flush; %d seconds since last write)",
- i, conn->address, conn->port,
+ log_fn(LOG_NOTICE,"Expiring stuck OR connection to fd %d (%s:%d). (%d bytes to flush; %d seconds since last write)",
+ conn->s, conn->address, conn->port,
(int)buf_datalen(conn->outbuf),
(int)(now-conn->timestamp_lastwritten));
connection_mark_for_close(conn);