I think there is a race condition and I have no clue how to fix it:
Main-Thread calls "MHD_quiesce_daemon()"
Main-Thread sleeps until last connection is closed
Poll-Thread wakes up the Main-Thread from "MHD_OPTION_NOTIFY_CONNECTION"
because of "MHD_CONNECTION_NOTIFY_CLOSED"
Main-Thread calls "MHD_get_daemon_info(MHD_DAEMON_INFO_CURRENT_CONNECTIONS)"
and gets "1 connection"
Poll-Thread removes the connection-struct
Main-Thread sleeps forever (there are "0 connections" now)
Would it be possible to call "MHD_CONNECTION_NOTIFY_CLOSED" after decrement
of the daemon-connection-counter?