summaryrefslogtreecommitdiff
path: root/src/or/hs_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/hs_client.c')
-rw-r--r--src/or/hs_client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index c98131cc77..c8b65aeab7 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -746,6 +746,14 @@ handle_introduce_ack_success(origin_circuit_t *intro_circ)
}
assert_circ_anonymity_ok(rend_circ, get_options());
+
+ /* It is possible to get a RENDEZVOUS2 cell before the INTRODUCE_ACK which
+ * means that the circuit will be joined and already transmitting data. In
+ * that case, simply skip the purpose change and close the intro circuit
+ * like it should be. */
+ if (TO_CIRCUIT(rend_circ)->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
+ goto end;
+ }
circuit_change_purpose(TO_CIRCUIT(rend_circ),
CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED);
/* Set timestamp_dirty, because circuit_expire_building expects it to