aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-03-15 22:26:08 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-03-15 22:26:08 +0300
commit96aabc147dca3043fca5822ff0756e4bcfacf404 (patch)
tree40e3c5e9346ba7888025bb066816f6e4ac0743a7
parentafb221c32aeeb2731e3b5362cc4ff8949d34edea (diff)
downloadlibmicrohttpd-96aabc147dca3043fca5822ff0756e4bcfacf404.tar.gz
libmicrohttpd-96aabc147dca3043fca5822ff0756e4bcfacf404.zip
MHD_connection_handle_idle(): fixed reset of 'connection->in_idle' to false
-rw-r--r--src/microhttpd/connection.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 40182c4e..f85ab21b 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2737,6 +2737,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
2737 char *line; 2737 char *line;
2738 size_t line_len; 2738 size_t line_len;
2739 int client_close; 2739 int client_close;
2740 int ret;
2740 2741
2741 connection->in_idle = true; 2742 connection->in_idle = true;
2742 while (1) 2743 while (1)
@@ -3218,11 +3219,15 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
3218 return MHD_YES; 3219 return MHD_YES;
3219 } 3220 }
3220 MHD_connection_update_event_loop_info (connection); 3221 MHD_connection_update_event_loop_info (connection);
3222 ret = MHD_YES;
3221#ifdef EPOLL_SUPPORT 3223#ifdef EPOLL_SUPPORT
3222 if (0 != (daemon->options & MHD_USE_EPOLL)) 3224 if (0 != (daemon->options & MHD_USE_EPOLL))
3223 return MHD_connection_epoll_update_ (connection); 3225 {
3226 ret = MHD_connection_epoll_update_ (connection);
3227 }
3224#endif /* EPOLL_SUPPORT */ 3228#endif /* EPOLL_SUPPORT */
3225 return MHD_YES; 3229 connection->in_idle = false;
3230 return ret;
3226} 3231}
3227 3232
3228 3233