From a7aa22a4e76d0076e4c46f474708d2386c3139c6 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 24 Oct 2022 11:03:38 -0400 Subject: hs: Retry rdv circuit if repurposed This can happen if our measurement subsystem decides to snatch it. Fixes #40696 Signed-off-by: David Goulet --- src/feature/hs/hs_circuit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/feature/hs') diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c index d253802f79..edb5e692e7 100644 --- a/src/feature/hs/hs_circuit.c +++ b/src/feature/hs/hs_circuit.c @@ -1319,6 +1319,17 @@ hs_circ_cleanup_on_repurpose(circuit_t *circ) if (circ->hs_token) { hs_circuitmap_remove_circuit(circ); } + + switch (circ->purpose) { + case CIRCUIT_PURPOSE_S_CONNECT_REND: + /* This circuit was connecting to a rendezvous point but it is being + * repurposed so we need to relaunch an attempt else the client will be + * left hanging waiting for the rendezvous. */ + hs_circ_retry_service_rendezvous_point(TO_ORIGIN_CIRCUIT(circ)); + break; + default: + break; + } } /** Return true iff the given established client rendezvous circuit was sent -- cgit v1.2.3-54-g00ecf