summaryrefslogtreecommitdiff
path: root/server/mpm/event/event.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-07-22 16:10:02 +0000
committerYann Ylavic <ylavic@apache.org>2021-07-22 16:10:02 +0000
commit2a7de1e2a37464d166c1c8c5c41d7c4e49181c8c (patch)
treefdf0b479bc0595cc08e50fa158b9207b9388fd07 /server/mpm/event/event.c
parent2515db492e98bca96b2510c1fb792ba47b65e1f0 (diff)
downloadhttpd-2a7de1e2a37464d166c1c8c5c41d7c4e49181c8c.tar.gz
mpm_event: avoid possible timer off by 250 ms.
* server/mpm/event/event.c (listener_thread): EVENT_FUDGE_FACTOR is used to limit wakeups but still expiring timers should be compared with the real apr_time_now(). Similar to r1874277 for TIMEOUT_FUDGE_FACTOR. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891727 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/event/event.c')
-rw-r--r--server/mpm/event/event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index e77da8b2b9..24a90c818b 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -1934,10 +1934,10 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
* the maximum time to poll() below, if any.
*/
expiry = timers_next_expiry;
- if (expiry && expiry < now + EVENT_FUDGE_FACTOR) {
+ if (expiry && expiry < now) {
apr_thread_mutex_lock(g_timer_skiplist_mtx);
while ((te = apr_skiplist_peek(timer_skiplist))) {
- if (te->when > now + EVENT_FUDGE_FACTOR) {
+ if (te->when > now) {
timers_next_expiry = te->when;
timeout = te->when - now;
break;