summaryrefslogtreecommitdiff
path: root/src/or/hs_service.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-11 09:45:17 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-11 09:45:17 -0500
commit98682f689be39c833c8718d5983c3e8882b54228 (patch)
tree018dd3402d6113c413451e5279e2a7f8ed3dcc3c /src/or/hs_service.c
parent58e8094816cb7d2dbc6ecc71892b667e968d9e2d (diff)
parentd68abbe358af41b18c9c54444e49689e2626328d (diff)
downloadtor-98682f689be39c833c8718d5983c3e8882b54228.tar.gz
tor-98682f689be39c833c8718d5983c3e8882b54228.zip
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r--src/or/hs_service.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c
index 4190f1a038..0d208daa45 100644
--- a/src/or/hs_service.c
+++ b/src/or/hs_service.c
@@ -1843,6 +1843,12 @@ cleanup_intro_points(hs_service_t *service, time_t now)
(node == NULL) ? " fell off the consensus" : "",
ip->circuit_retries);
+ /* We've retried too many times, remember it as a failed intro point
+ * so we don't pick it up again for INTRO_CIRC_RETRY_PERIOD sec. */
+ if (ip->circuit_retries > MAX_INTRO_POINT_CIRCUIT_RETRIES) {
+ remember_failing_intro_point(ip, desc, approx_time());
+ }
+
/* Remove intro point from descriptor map. We'll add it to the failed
* map if we retried it too many times. */
MAP_DEL_CURRENT(key);
@@ -3131,15 +3137,6 @@ hs_service_intro_circ_has_closed(origin_circuit_t *circ)
* keeping the object in the descriptor, we'll be able to retry. */
ip->circuit_established = 0;
- /* We've retried too many times, remember it as a failed intro point so we
- * don't pick it up again. It will be retried in INTRO_CIRC_RETRY_PERIOD
- * seconds. */
- if (ip->circuit_retries > MAX_INTRO_POINT_CIRCUIT_RETRIES) {
- remember_failing_intro_point(ip, desc, approx_time());
- service_intro_point_remove(service, ip);
- service_intro_point_free(ip);
- }
-
end:
return;
}