diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-19 16:30:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-19 16:30:53 -0500 |
commit | df4d5ebb7dfaac49915d7ef775fcbf242e6c688b (patch) | |
tree | c6ccb857cc9077dc00c7862be460ee8f49b942b3 /src/or/hs_circuit.c | |
parent | fa6137a903ef984f64d89e984cf285bf5158e08f (diff) | |
parent | 129456e22257d24c380bed0f9ebc9d68955a01df (diff) | |
download | tor-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.c | 7 |
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. " |