summaryrefslogtreecommitdiff
path: root/src/or/hs_circuit.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-01-19 16:26:26 -0500
committerDavid Goulet <dgoulet@torproject.org>2018-01-19 16:26:26 -0500
commitf870f9c8bcdbf2f8fd1c1e1feb9f88dc111ab25a (patch)
tree1725d467f118be34c702ec94c041ca8b6d788f35 /src/or/hs_circuit.c
parent44388757c44834d63614c4e13cf88931992afc2a (diff)
parentf98f7ca89865d1a477fc65165b92c86b9d8437fa (diff)
downloadtor-f870f9c8bcdbf2f8fd1c1e1feb9f88dc111ab25a.tar.gz
tor-f870f9c8bcdbf2f8fd1c1e1feb9f88dc111ab25a.zip
Merge branch 'bug24895_031_02' into bug24895_032_02
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 11ce2a1887..66c59e0dc7 100644
--- a/src/or/hs_circuit.c
+++ b/src/or/hs_circuit.c
@@ -484,9 +484,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. "