From 63bb27f19d6cb1d27ac557220d8f8b0561d5022f Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Mon, 12 Sep 2005 07:36:26 +0000 Subject: be more thorough about noticing when a directory request has failed: it has failed not only when the connection attempt fails, but also if the conn reaches eof before we get a response that we're happy with. svn:r5013 --- src/or/connection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/or/connection.c') diff --git a/src/or/connection.c b/src/or/connection.c index 156bbc0b7..8474ad5c6 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -319,10 +319,10 @@ connection_about_to_close_connection(connection_t *conn) switch (conn->type) { case CONN_TYPE_DIR: - if (conn->state == DIR_CONN_STATE_CONNECTING) { - /* it's a directory server and connecting failed: forget about - this router */ - connection_dir_connect_failed(conn); + if (conn->state < DIR_CONN_STATE_CLIENT_FINISHED) { + /* It's a directory connection and connecting or fetching + * failed: forget about this router, and maybe try again. */ + connection_dir_request_failed(conn); } if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC) rend_client_desc_here(conn->rend_query); /* give it a try */ -- cgit v1.2.3