aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorMarcus Griep <marcus@griep.us>2009-06-23 23:09:27 -0400
committerMarcus Griep <marcus@griep.us>2009-06-24 00:10:20 -0400
commitfa89c9f0868d4902e0298ac9ef23e521633f933b (patch)
tree5c3c99eb0b80e7929db7841f0c8a9c5147f349a7 /src/or
parentb91428cfd36d1014bbd77ea1a53cddded92a6d14 (diff)
downloadtor-fa89c9f0868d4902e0298ac9ef23e521633f933b.tar
tor-fa89c9f0868d4902e0298ac9ef23e521633f933b.tar.gz
Flush long replies over control port on QUIT
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.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 486ccc4c7..98c6aa458 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -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;
}