On Saturday 06 September 2025 at 23:35:22 +0200, Evgeny Grin via libmicrohttpd 
wrote:
> For me, seems logical to close everything in case of failure, like with
> MHD_daemon_destroy().

That sounds good to me.

> Typical application logic does not use any kind of fallback paths, like "if
> daemon failed with these options, let's try to start with other options".

We used to actually do that before we started using
MHD_OPTION_LISTEN_SOCKET. We'd try again without (MHD_USE_IPv6 |
MHD_USE_DUAL_STACK). I agree that it's not a particularly important
consideration though. The caller can always dup() the socket beforehand if
they want to try again on error.

> The code for v1.x will be fixed to close the socket always (unless there are
> strong arguments against it) and documented correctly.

That's great. Thank you!

Mike.

Reply via email to