[tor-commits] [tor/master] When hibernating, close connections normally and allow them to flush

nickm at torproject.org nickm at torproject.org
Tue Oct 31 15:59:44 UTC 2017


commit e57604183cf5a0fb9e99522cbd7f1548784d63a8
Author: teor <teor2345 at gmail.com>
Date:   Tue Sep 19 14:17:35 2017 +1000

    When hibernating, close connections normally and allow them to flush
    
    Bugfix on 7267 in 0.2.4.7-alpha
---
 changes/bug23571   | 3 +++
 src/or/hibernate.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug23571 b/changes/bug23571
new file mode 100644
index 000000000..9d4c4082a
--- /dev/null
+++ b/changes/bug23571
@@ -0,0 +1,3 @@
+  o Minor bugfixes (hibernation):
+    - When hibernating, close connections normally and allow them to flush.
+      Bugfix on 7267 in 0.2.4.7-alpha.
diff --git a/src/or/hibernate.c b/src/or/hibernate.c
index 8c48a6f47..e60306a73 100644
--- a/src/or/hibernate.c
+++ b/src/or/hibernate.c
@@ -34,6 +34,7 @@ hibernating, phase 2:
 #include "config.h"
 #include "connection.h"
 #include "connection_edge.h"
+#include "connection_or.h"
 #include "control.h"
 #include "hibernate.h"
 #include "main.h"
@@ -914,7 +915,7 @@ hibernate_go_dormant(time_t now)
                                     END_STREAM_REASON_HIBERNATING);
     else if (conn->type == CONN_TYPE_OR) {
       if (TO_OR_CONN(conn)->chan) {
-        channel_mark_for_close(TLS_CHAN_TO_BASE(TO_OR_CONN(conn)->chan));
+        connection_or_close_normally(TO_OR_CONN(conn), 0);
       } else {
          connection_mark_for_close(conn);
       }





More information about the tor-commits mailing list