commit 1619b9f051ac4694d563803ec25dad724f417ab4
parent 8a9b198d4ab3a6f47569b139343f4b52a2c9494e
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 13 Dec 2018 22:51:05 +0100
reset timeout on response being queued, needed in thread-per-connection mode if the working thread takes very long
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 13 22:48:14 CET 2018
+ Fix connection timeout logic if in thread-per-connection mode the
+ working thread takes longer than the timeout to queue the response. -CG
+
Tue Dec 11 09:58:32 CET 2018
Add logic to avoid VLA arrays with compilers that do not support them. -CG
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -3655,7 +3655,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
if (NULL != connection->response->crc)
MHD_mutex_lock_chk_ (&connection->response->mutex);
-#endif
+#endif
if ( (0 == connection->response->total_size) ||
(connection->response_write_position ==
connection->response->total_size) )
@@ -4099,6 +4099,7 @@ MHD_queue_response (struct MHD_Connection *connection,
}
if (! connection->in_idle)
(void) MHD_connection_handle_idle (connection);
+ MHD_update_last_activity_ (connection);
return MHD_YES;
}