diff options
-rw-r--r-- | src/or/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index d10996b69..17ef1b76a 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -597,8 +597,11 @@ run_connection_housekeeping(int i, time_t now) } /* Expire any directory connections that haven't sent anything for 5 min */ - if (conn->type == CONN_TYPE_DIR && DIR_CONN_IS_SERVER(conn) && - conn->timestamp_lastwritten + DIR_CONN_MAX_STALL < now) { + if (conn->type == CONN_TYPE_DIR && + ((DIR_CONN_IS_SERVER(conn) && + conn->timestamp_lastwritten + DIR_CONN_MAX_STALL < now) || + (!DIR_CONN_IS_SERVER(conn) && + conn->timestamp_lastread + DIR_CONN_MAX_STALL < now))) { log_info(LD_DIR,"Expiring wedged directory conn (fd %d, purpose %d)", conn->s, conn->purpose); /* This check is temporary; it's to let us know whether we should consider |