X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_prometheus.c;h=6f9b0490954f9063d11955c43f8b8c6e67f68a2c;hp=3b22922a9bece488e038f1956b51d894b5d64801;hb=733fc645b6389d1f42aef8f1c1631f1db7d58196;hpb=d0c99e96294d7a047641028a501afdac9f8ec0ed diff --git a/src/write_prometheus.c b/src/write_prometheus.c index 3b22922a..6f9b0490 100644 --- a/src/write_prometheus.c +++ b/src/write_prometheus.c @@ -802,8 +802,13 @@ static struct MHD_Daemon *prom_start_daemon() { return NULL; } + unsigned int flags = MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG; +#if MHD_VERSION >= 0x00095300 + flags |= MHD_USE_INTERNAL_POLLING_THREAD; +#endif + struct MHD_Daemon *d = MHD_start_daemon( - MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, httpd_port, + flags, httpd_port, /* MHD_AcceptPolicyCallback = */ NULL, /* MHD_AcceptPolicyCallback arg = */ NULL, http_handler, NULL, MHD_OPTION_LISTEN_SOCKET, fd, MHD_OPTION_EXTERNAL_LOGGER, prom_logger,