commit e9cf773a0ae6367ea21eb9d98a01e4a4088ce0e5
parent 9f7422a6f643c0a05a9f1ed66c84cf9d1eaae253
Author: Matthias Wachs <wachs@in.tum.de>
Date: Fri, 16 Sep 2011 17:42:16 +0000
fixing implications of new early response cleanup code -CG
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
@@ -1857,6 +1857,8 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
break;
case MHD_CONNECTION_HEADERS_SENDING:
do_write (connection);
+ if (connection->state != MHD_CONNECTION_HEADERS_SENDING)
+ break;
check_write_done (connection, MHD_CONNECTION_HEADERS_SENT);
break;
case MHD_CONNECTION_HEADERS_SENT:
@@ -1910,6 +1912,8 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
break;
case MHD_CONNECTION_CHUNKED_BODY_READY:
do_write (connection);
+ if (connection->state != MHD_CONNECTION_CHUNKED_BODY_READY)
+ break;
check_write_done (connection,
(connection->response->total_size ==
connection->response_write_position) ?
@@ -1922,6 +1926,8 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
break;
case MHD_CONNECTION_FOOTERS_SENDING:
do_write (connection);
+ if (connection->state != MHD_CONNECTION_FOOTERS_SENDING)
+ break;
check_write_done (connection, MHD_CONNECTION_FOOTERS_SENT);
break;
case MHD_CONNECTION_FOOTERS_SENT: