]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs: Note the connection attempt if descriptor is unusable
authorDavid Goulet <dgoulet@torproject.org>
Fri, 25 Aug 2017 17:39:40 +0000 (13:39 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Fri, 25 Aug 2017 17:39:40 +0000 (13:39 -0400)
This way, we can clear off the directory requests from our cache and thus
allow the next client to query those HSDir again at the next SOCKS connection.

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/or/hs_client.c

index 9c2aa34e958bedb0cc91b328307c269f8c02aa7c..99be058eb7f1875e7330a5aa0b136806a4e2ce98 100644 (file)
@@ -1103,7 +1103,9 @@ hs_client_desc_has_arrived(const hs_ident_dir_conn_t *ident)
                         "Closing streams.");
       connection_mark_unattached_ap(entry_conn,
                                     END_STREAM_REASON_RESOLVEFAILED);
-      /* XXX: Note the connection attempt. */
+      /* We are unable to use the descriptor so remove the directory request
+       * from the cache so the next connection can try again. */
+      note_connection_attempt_succeeded(edge_conn->hs_ident);
       goto end;
     }