--- libmicrohttpd-0.9.55.orig/src/microhttpd/daemon.c 2017-05-28 22:34:00.000000000 +0200 +++ libmicrohttpd-0.9.55/src/microhttpd/daemon.c 2017-09-03 15:41:00.654496718 +0200 @@ -1150,9 +1150,15 @@ if ( (MHD_EVENT_LOOP_INFO_READ == con->event_loop_info) && read_ready) { +#ifdef EPOLL_SUPPORT + do { +#endif con->read_handler (con); ret = con->idle_handler (con); states_info_processed = true; +#ifdef EPOLL_SUPPORT + } while (con->epoll_state & MHD_EPOLL_STATE_READ_READY); +#endif } /* No need to check value of 'ret' here as closed connection * cannot be in MHD_EVENT_LOOP_INFO_WRITE state. */