commit 92c4de41465e1120129584bce6981034166f762a
parent c38412e3fd082f2d90adc12594b9657c9496a854
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Thu, 27 Oct 2016 22:26:32 +0300
MHD_epoll(): do not clear ITC before processing upgraded connections
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -3613,6 +3613,9 @@ MHD_epoll (struct MHD_Daemon *daemon,
int num_events;
unsigned int i;
unsigned int series_length;
+#if HTTPS_SUPPORT
+ _MHD_bool run_upgraded = 0;
+#endif
if (-1 == daemon->epoll_fd)
return MHD_NO; /* we're down! */
@@ -3724,7 +3727,7 @@ MHD_epoll (struct MHD_Daemon *daemon,
{
/* activity on an upgraded connection, we process
those in a separate epoll() */
- run_epoll_for_upgrade (daemon);
+ run_upgraded = !0;
continue;
}
#endif
@@ -3786,6 +3789,9 @@ MHD_epoll (struct MHD_Daemon *daemon,
}
}
+ if (run_upgraded)
+ run_epoll_for_upgrade (daemon);
+
/* we handle resumes here because we may have ready connections
that will not be placed into the epoll list immediately. */
if (MHD_USE_SUSPEND_RESUME == (daemon->options & MHD_USE_SUSPEND_RESUME))