]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Flush long replies over control port on QUIT
authorMarcus Griep <marcus@griep.us>
Wed, 24 Jun 2009 03:09:27 +0000 (23:09 -0400)
committerMarcus Griep <marcus@griep.us>
Wed, 24 Jun 2009 04:10:20 +0000 (00:10 -0400)
Marks the control port connection for flushing before closing when
the QUIT command is issued. This allows a QUIT to be issued during
a long reply over the control port, flushing the reply and then
closing the connection. Fixes bug 1015.

src/or/control.c

index 486ccc4c75bc9adf839b3c202bc73b09d8dc5990..98c6aa458cb59f9a1509dd9a6937a991eaebbfa9 100644 (file)
@@ -2892,6 +2892,7 @@ connection_control_process_inbuf(control_connection_t *conn)
   if (!strcasecmp(conn->incoming_cmd, "QUIT")) {
     connection_write_str_to_buf("250 closing connection\r\n", conn);
     connection_mark_for_close(TO_CONN(conn));
+    conn->_base.hold_open_until_flushed = 1;
     return 0;
   }