Re: [libmicrohttpd] Busy waiting up to one second using connection timeout

2021-08-12 Thread Evgeny Grin
Please see my comments below. On 12.08.2021 12:36, Irion, Alexander wrote: I would say that the timer granularity and the fix are two different things, even if granularity would be finer, the checking condition like before was wrong and would lead to unnecessary busy cycles. That's correct i

Re: [libmicrohttpd] Busy waiting up to one second using connection timeout

2021-08-12 Thread Irion, Alexander
I would say that the timer granularity and the fix are two different things, even if granularity would be finer, the checking condition like before was wrong and would lead to unnecessary busy cycles. Is a timeout of only one second a real use case? In any way, your example below would result in

Re: [libmicrohttpd] Busy waiting up to one second using connection timeout

2021-08-12 Thread Evgeny Grin
The report itself is correct, thanks for this! However while the patch fixed one problem, it creates another one. The problem connected to low granularity (rounded to one second) of the MHD's internal timer. If connection timeout is set to one second (for example) then connection may expire at

Re: [libmicrohttpd] Busy waiting up to one second using connection timeout

2021-08-11 Thread Christian Grothoff
Thanks for the detailed report, the patch looks good as-is, applied to master as f5d387df7e7fb8de1a5dd0739ddb83a8b19fe64b Happy hacking! Christian On 8/11/21 6:02 PM, Irion, Alexander wrote: > Hello! > > I discovered a problem with closing connections, when > MHD_OPTION_CONNECTION_TIMEOUT is u