[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35535 - in libmicrohttpd: . src/include src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35535 - in libmicrohttpd: . src/include src/microhttpd |
Date: |
Wed, 15 Apr 2015 00:34:15 +0200 |
Author: grothoff
Date: 2015-04-15 00:34:15 +0200 (Wed, 15 Apr 2015)
New Revision: 35535
Modified:
libmicrohttpd/AUTHORS
libmicrohttpd/ChangeLog
libmicrohttpd/src/include/microhttpd.h
libmicrohttpd/src/microhttpd/daemon.c
Log:
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
Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS 2015-04-13 20:26:36 UTC (rev 35534)
+++ libmicrohttpd/AUTHORS 2015-04-14 22:34:15 UTC (rev 35535)
@@ -53,6 +53,7 @@
Guy Martin <address@hidden>
Robert Groenenberg <address@hidden>
Denis Dowling <address@hidden>
+Louis Benoit <address@hidden>
Documentation contributions also came from:
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2015-04-13 20:26:36 UTC (rev 35534)
+++ libmicrohttpd/ChangeLog 2015-04-14 22:34:15 UTC (rev 35535)
@@ -1,3 +1,7 @@
+Wed Apr 15 00:30:34 CEST 2015
+ Fix looping issue when using MHD_USE_POLL_INTERNALLY
+ and a client times out. -LB
+
Sun Apr 12 21:48:50 CEST 2015
Fix looping issue when combining MHD_USE_EPOLL_LINUX_ONLY
with HTTPS and slow clients. -CG
Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h 2015-04-13 20:26:36 UTC (rev
35534)
+++ libmicrohttpd/src/include/microhttpd.h 2015-04-14 22:34:15 UTC (rev
35535)
@@ -130,7 +130,7 @@
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00094004
+#define MHD_VERSION 0x00094005
/**
* MHD-internal return code for "YES".
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2015-04-13 20:26:36 UTC (rev
35534)
+++ libmicrohttpd/src/microhttpd/daemon.c 2015-04-14 22:34:15 UTC (rev
35535)
@@ -2474,7 +2474,7 @@
pos->idle_handler (pos);
break;
case MHD_EVENT_LOOP_INFO_CLEANUP:
- /* should never happen */
+ pos->idle_handler (pos);
break;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35535 - in libmicrohttpd: . src/include src/microhttpd,
gnunet <=