summaryrefslogtreecommitdiff
path: root/src/or/hs_circuit.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-19 16:30:53 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-19 16:30:53 -0500
commitdf4d5ebb7dfaac49915d7ef775fcbf242e6c688b (patch)
treec6ccb857cc9077dc00c7862be460ee8f49b942b3 /src/or/hs_circuit.c
parentfa6137a903ef984f64d89e984cf285bf5158e08f (diff)
parent129456e22257d24c380bed0f9ebc9d68955a01df (diff)
downloadtor-df4d5ebb7dfaac49915d7ef775fcbf242e6c688b.tar.gz
tor-df4d5ebb7dfaac49915d7ef775fcbf242e6c688b.zip
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src/or/hs_circuit.c')
-rw-r--r--src/or/hs_circuit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/hs_circuit.c b/src/or/hs_circuit.c
index c896eeb0cc..753c0fcd6a 100644
--- a/src/or/hs_circuit.c
+++ b/src/or/hs_circuit.c
@@ -485,9 +485,14 @@ can_relaunch_service_rendezvous_point(const origin_circuit_t *circ)
goto disallow;
}
+ /* We check failure_count >= hs_get_service_max_rend_failures()-1 below, and
+ * the -1 is because we increment the failure count for our current failure
+ * *after* this clause. */
+ int max_rend_failures = hs_get_service_max_rend_failures() - 1;
+
/* A failure count that has reached maximum allowed or circuit that expired,
* we skip relaunching. */
- if (circ->build_state->failure_count > MAX_REND_FAILURES ||
+ if (circ->build_state->failure_count > max_rend_failures ||
circ->build_state->expiry_time <= time(NULL)) {
log_info(LD_REND, "Attempt to build a rendezvous circuit to %s has "
"failed with %d attempts and expiry time %ld. "