Files
libmicrohttpd/src/lib
Alexander Irion f5d387df7e Fix busy waiting up to one second using connection timeout
MHD_daemon_get_timeout computes the time to wait as:
timeout = (last_activity + connection_timeout - MHD_monotonic_sec_counter ()) * 1000

After sleeping timeout milliseconds, MHD_monotonic_sec_counter () will be:

MHD_monotonic_sec_counter () = last_activity + connection_timeout

With that (timeout < (MHD_monotonic_sec_counter () - connection->last_activity)) evaluates to false and the MHD_connection_close_ is not done.
For the next cycle, MHD_daemon_get_timeout() will return 0 and this goes on, until MHD_monotonic_sec_counter jumps to the next second.

This bug causes thousands of unnecessary calls to MHD_run, when a connection timed out.
2021-08-11 22:38:41 +02:00
..
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2020-05-09 14:11:14 -03:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2020-07-23 00:05:52 +02:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2018-02-09 05:44:20 +01:00
2019-10-31 13:06:08 +01:00
2019-10-31 13:06:08 +01:00
2020-07-23 00:05:52 +02:00
2020-07-23 00:05:52 +02:00
2019-10-31 13:06:08 +01:00