libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit a244273450a9335a9ddcbe361876b98b8f1121bd
parent 2d15eceddf5b213e4c21137a12f267fee0e1c775
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 23 Mar 2011 22:30:47 +0000

pollin issue

Diffstat:
MChangeLog | 5+++++
Msrc/daemon/daemon.c | 2+-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 23 23:24:25 CET 2011 + Do not use POLLIN when we only care about POLLHUP (significantly + improves performance when using MHD_USE_THREAD_PER_CONNECTION + in combination with MHD_USE_POLL). -ES + Sun Mar 20 09:16:53 CET 2011 Fixing race when using MHD_USE_THREAD_PER_CONNECTION in combination with MHD_USE_POLL. -CG diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -647,7 +647,7 @@ MHD_handle_connection (void *data) fd = con->daemon->socket_fd; p[1].fd = fd; - p[1].events |= POLLIN; + p[1].events = 0; /* only care about POLLHUP */ if (poll (p, (fd != -1) ? 2 : 1,