aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-12 07:36:26 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-12 07:36:26 +0000
commit63bb27f19d6cb1d27ac557220d8f8b0561d5022f (patch)
treeeef8d9f12dbbda47f21c76d732b44f4b208d330a /src/or/connection.c
parent3dc5e77b5867815244e9f37beba56dc995a2fe2b (diff)
downloadtor-63bb27f19d6cb1d27ac557220d8f8b0561d5022f.tar
tor-63bb27f19d6cb1d27ac557220d8f8b0561d5022f.tar.gz
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
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c8
1 files changed, 4 insertions, 4 deletions
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 */