diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/circuituse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c index 485c389054..18b419e99d 100644 --- a/src/core/or/circuituse.c +++ b/src/core/or/circuituse.c @@ -3082,6 +3082,12 @@ circuit_change_purpose(circuit_t *circ, uint8_t new_purpose) circ->purpose, circuit_purpose_to_string(new_purpose), new_purpose); + + /* Take specific actions if we are repurposing a hidden service circuit. */ + if (circuit_purpose_is_hidden_service(circ->purpose) && + !circuit_purpose_is_hidden_service(new_purpose)) { + hs_circ_cleanup(circ); + } } old_purpose = circ->purpose; |