X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_prometheus.c;h=28ab6ce7973e5947c006368c6a585f9408318f37;hb=9c6c1bdb92537f307d245c52349d3f196ec4d33d;hp=7c4e59e79472014b63ce862f7ec175e9287f05e4;hpb=0d9f395599348e735e6f461e1c328293bef0d060;p=collectd.git diff --git a/src/write_prometheus.c b/src/write_prometheus.c index 7c4e59e7..28ab6ce7 100644 --- a/src/write_prometheus.c +++ b/src/write_prometheus.c @@ -804,8 +804,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,