mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
make MHD use epoll if available
This commit is contained in:
parent
05fafe0fa4
commit
595ddd934e
1 changed files with 8 additions and 1 deletions
|
@ -135,7 +135,14 @@ int
|
||||||
start_web_ui(wui_context_t *context)
|
start_web_ui(wui_context_t *context)
|
||||||
{
|
{
|
||||||
log_debug("Starting Web UI");
|
log_debug("Starting Web UI");
|
||||||
mhd_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY,
|
int use_epoll = MHD_is_feature_supported(MHD_FEATURE_EPOLL) == MHD_YES;
|
||||||
|
log_debug("MHD will use epoll: %u", use_epoll);
|
||||||
|
|
||||||
|
unsigned flags = MHD_USE_SELECT_INTERNALLY;
|
||||||
|
if (use_epoll)
|
||||||
|
flags = MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY;
|
||||||
|
|
||||||
|
mhd_daemon = MHD_start_daemon(flags,
|
||||||
context->port, NULL, NULL,
|
context->port, NULL, NULL,
|
||||||
&answer_to_connection, (void*) context, MHD_OPTION_END);
|
&answer_to_connection, (void*) context, MHD_OPTION_END);
|
||||||
return mhd_daemon != NULL ? 0 : -1;
|
return mhd_daemon != NULL ? 0 : -1;
|
||||||
|
|
Loading…
Reference in a new issue