Simplification: move external loop specific code from internal_run_from_select() to

MHD_run_from_select().
This commit is contained in:
Evgeny Grin (Karlson2k)
2017-03-26 13:45:04 +03:00
parent ab04f53b95
commit b5bfa6ee2c
+4 -6
View File
@@ -3332,8 +3332,6 @@ internal_run_from_select (struct MHD_Daemon *daemon,
struct MHD_UpgradeResponseHandle *urh;
struct MHD_UpgradeResponseHandle *urhn;
#endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
unsigned int mask = MHD_TEST_ALLOW_SUSPEND_RESUME | MHD_USE_INTERNAL_POLLING_THREAD;
/* Reset. New value will be set when connections are processed. */
/* Note: no-op for thread-per-connection as it is always false in that mode. */
daemon->data_already_pending = false;
@@ -3346,10 +3344,6 @@ internal_run_from_select (struct MHD_Daemon *daemon,
read_fd_set)) )
MHD_itc_clear_ (daemon->itc);
/* Resuming external connections when using an extern mainloop */
if (MHD_TEST_ALLOW_SUSPEND_RESUME == (daemon->options & mask))
resume_suspended_connections (daemon);
#ifdef EPOLL_SUPPORT
if (0 != (daemon->options & MHD_USE_EPOLL))
{
@@ -3477,6 +3471,10 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
return MHD_NO;
#endif /* ! EPOLL_SUPPORT */
}
/* Resuming external connections when using an extern mainloop */
resume_suspended_connections (daemon);
return internal_run_from_select (daemon, read_fd_set,
write_fd_set, except_fd_set);
}