libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] race condition on 0.9.73


From: Evgeny Grin
Subject: Re: [libmicrohttpd] race condition on 0.9.73
Date: Sat, 25 Sep 2021 17:35:42 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Hi José,

Thanks for the report!

If MHD needs to (re-)run MHD_run() immediately MHD_get_timeout() must return zero timeout.
You don't need to re-run it if no timeout is returned.
Zero timeout if connection cleanup is pending was enforced by Christian in version 0.9.73.
See https://lists.gnu.org/archive/html/libmicrohttpd/2021-01/msg00003.html
Let me know if it doesn't work for you, so we will be able to fix it before the next release.

Function MHD_run_wait() was added for upcoming version 0.9.74, but it does not return flag "need to re-run". MHD_get_timeout() already serves for this purpose.

--
Evgeny


On 24.09.2021 19:22, José Bollo wrote:

Hi Evgeny,

Seems fixed on my side. I enforced single call of MHD_run. But I added
a special treatment to enforce call to MHD_run even if MHD_get_timeout
returned a timeout different of zero.

This last point was discussed in the ML thread
https://lists.gnu.org/archive/html/libmicrohttpd/2020-12/msg00017.html

It could be of great advantage that MHD_get_timeout returns valuable
value and also to have a version of MHD_run with a timeout (0 in my
case) and returning a value indicating if it has to be called again for
pending actions.

Thank you for your help.

Best regards
José

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]