summaryrefslogtreecommitdiff
path: root/src/feature/dircache
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/dircache')
-rw-r--r--src/feature/dircache/directory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/dircache/directory.c b/src/feature/dircache/directory.c
index a723176185..888a7c1939 100644
--- a/src/feature/dircache/directory.c
+++ b/src/feature/dircache/directory.c
@@ -5210,6 +5210,9 @@ connection_dir_finished_flushing(dir_connection_t *conn)
tor_assert(conn);
tor_assert(conn->base_.type == CONN_TYPE_DIR);
+ if (conn->base_.marked_for_close)
+ return 0;
+
/* Note that we have finished writing the directory response. For direct
* connections this means we're done; for tunneled connections it's only
* an intermediate step. */