aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-09 02:51:20 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-09 02:51:20 +0000
commitbe1e577d5e44d1ab1c9b180e644dc05872faa88a (patch)
tree4c37842f265246e2d5a245ceecb9b101164a4cc5
parent1f034cc5c7feb19f738b4e43b86ab2c0bf1eb1b1 (diff)
downloadtor-be1e577d5e44d1ab1c9b180e644dc05872faa88a.tar
tor-be1e577d5e44d1ab1c9b180e644dc05872faa88a.tar.gz
Re-fetch v2 rendezvous descriptor only when first try failed. Patch from karsten.
svn:r13439
-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 4d7474775..eeaebbccd 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -477,12 +477,12 @@ connection_about_to_close_connection(connection_t *conn)
/* It's a directory connection and connecting or fetching
* failed: forget about this router, and maybe try again. */
connection_dir_request_failed(dir_conn);
+ /* if we were trying to fetch a v2 rend desc, retry as needed */
+ if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC_V2)
+ rend_client_refetch_v2_renddesc(dir_conn->rend_query);
}
- /* if we were trying to fetch a rend desc, retry as needed */
if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC)
- rend_client_desc_here(dir_conn->rend_query);
- if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC_V2)
- rend_client_refetch_v2_renddesc(dir_conn->rend_query);
+ rend_client_desc_here(dir_conn->rend_query); /* give it a try */
break;
case CONN_TYPE_OR:
or_conn = TO_OR_CONN(conn);