Browse Source

Merge branch 'bug26896_034'

Nick Mathewson 5 years ago
parent
commit
3b960df4f9
2 changed files with 6 additions and 0 deletions
  1. 3 0
      changes/bug26896
  2. 3 0
      src/feature/dircache/directory.c

+ 3 - 0
changes/bug26896

@@ -0,0 +1,3 @@
+  o Minor bugfixes (directory connection shutdown):
+    - Avoid a double-close when shutting down a stalled directory connection.
+      Fixes bug 26896; bugfix on 0.3.4.1-alpha.

+ 3 - 0
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. */