summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-07-02 13:33:37 -0400
committerNick Mathewson <nickm@torproject.org>2019-07-02 13:33:37 -0400
commitcf92c096ad4338717a11aab71fd020d0514004e5 (patch)
treeba28ff142ec76834353a7326da26c7b78521fb27 /src/feature
parent15e28af2d18b26b9ec4eda4bc2e84ed8465a166f (diff)
parent87511766873fd22ebeff1bc9dcfa78773a890083 (diff)
downloadtor-cf92c096ad4338717a11aab71fd020d0514004e5.tar.gz
tor-cf92c096ad4338717a11aab71fd020d0514004e5.zip
Merge remote-tracking branch 'tor-github/pr/1120'
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/hs/hs_cache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c
index 05f9940ae6..9817113b23 100644
--- a/src/feature/hs/hs_cache.c
+++ b/src/feature/hs/hs_cache.c
@@ -710,6 +710,11 @@ cache_clean_v3_as_client(time_t now)
MAP_DEL_CURRENT(key);
entry_size = cache_get_client_entry_size(entry);
bytes_removed += entry_size;
+ /* We just removed an old descriptor. We need to close all intro circuits
+ * so we don't have leftovers that can be selected while lacking a
+ * descriptor. We leave the rendezvous circuits opened because they could
+ * be in use. */
+ hs_client_close_intro_circuits_from_desc(entry->desc);
/* Entry is not in the cache anymore, destroy it. */
cache_client_desc_free(entry);
/* Update our OOM. We didn't use the remove() function because we are in