diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 965f9985..1625078d 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -1610,6 +1610,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon, | |||
1610 | pos->idle_handler (pos); | 1610 | pos->idle_handler (pos); |
1611 | } | 1611 | } |
1612 | } | 1612 | } |
1613 | MHD_cleanup_connections (daemon); | ||
1613 | return MHD_YES; | 1614 | return MHD_YES; |
1614 | } | 1615 | } |
1615 | 1616 | ||
@@ -2153,14 +2154,22 @@ MHD_run (struct MHD_Daemon *daemon) | |||
2153 | (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) ) | 2154 | (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) ) |
2154 | return MHD_NO; | 2155 | return MHD_NO; |
2155 | if (0 != (daemon->options & MHD_USE_POLL)) | 2156 | if (0 != (daemon->options & MHD_USE_POLL)) |
2157 | { | ||
2156 | MHD_poll (daemon, MHD_NO); | 2158 | MHD_poll (daemon, MHD_NO); |
2159 | MHD_cleanup_connections (daemon); | ||
2160 | } | ||
2157 | #if EPOLL_SUPPORT | 2161 | #if EPOLL_SUPPORT |
2158 | else if (0 != (daemon->options & MHD_USE_EPOLL_LINUX_ONLY)) | 2162 | else if (0 != (daemon->options & MHD_USE_EPOLL_LINUX_ONLY)) |
2163 | { | ||
2159 | MHD_epoll (daemon, MHD_NO); | 2164 | MHD_epoll (daemon, MHD_NO); |
2165 | MHD_cleanup_connections (daemon); | ||
2166 | } | ||
2160 | #endif | 2167 | #endif |
2161 | else | 2168 | else |
2169 | { | ||
2162 | MHD_select (daemon, MHD_NO); | 2170 | MHD_select (daemon, MHD_NO); |
2163 | MHD_cleanup_connections (daemon); | 2171 | /* MHD_select does MHD_cleanup_connections already */ |
2172 | } | ||
2164 | return MHD_YES; | 2173 | return MHD_YES; |
2165 | } | 2174 | } |
2166 | 2175 | ||