aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-04-14 22:34:15 +0000
committerChristian Grothoff <christian@grothoff.org>2015-04-14 22:34:15 +0000
commitb86f93acaf57b6757daa8e8b0934d2a5bc29bf74 (patch)
tree409d11d473b9fa782cbbdb033f9b36b3250b9fbf /src/include
parent4837ce0471667b4784c1e68693b70032db22a09d (diff)
downloadlibmicrohttpd-b86f93acaf57b6757daa8e8b0934d2a5bc29bf74.tar.gz
libmicrohttpd-b86f93acaf57b6757daa8e8b0934d2a5bc29bf74.zip
HI,
The MHD goes in a busy loop when it is configured with MHD_USE_POLL_INTERNALLY and a connection times out. When the connection times out, the connection is closed at connection.c:2646, which sets connection->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP. When the loop info is set to MHD_EVENT_LOOP_INFO_CLEANUP, the main function of the thread loop, MHD_poll_all, never calls back the connection idle callback, which would have cleaned the connection and exit the loop. I resolved the issue in my development code by adding pos->idle_handler (pos) at daemon.c:2477 in MHD_poll_all (SVN 35533). The busy loop could be tested using a small enough connection timeout and netcat: nc -v -w 100 <IP ADDRESS> <IP PORT> CPU usage will reach 100% in one of the CPU and will remain at that level even when the netcat has closed its end of the connection. Thanks, Louis Benoit
Diffstat (limited to 'src/include')
-rw-r--r--src/include/microhttpd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 93c4c212..69fdd1d9 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -130,7 +130,7 @@ typedef intptr_t ssize_t;
130 * Current version of the library. 130 * Current version of the library.
131 * 0x01093001 = 1.9.30-1. 131 * 0x01093001 = 1.9.30-1.
132 */ 132 */
133#define MHD_VERSION 0x00094004 133#define MHD_VERSION 0x00094005
134 134
135/** 135/**
136 * MHD-internal return code for "YES". 136 * MHD-internal return code for "YES".