From 7b52bfc98261b61140b421e8dab7b5e897182837 Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 24 Jan 2007 18:28:39 +0000 Subject: [PATCH] fix really pathological case where io_timeouted would never start over from the beginning because always new accept()ed connections came in and got newer, higher descriptors since the last io_timeouted loop. (Dirk Engling) --- CHANGES | 4 ++++ io/io_timeouted.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index a8d53b7..84b9ef2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ 0.26: + fix really pathological case where io_timeouted would never + start over from the beginning because always new accept()ed + connections came in and got newer, higher descriptors since the last + io_timeouted loop. (Dirk Engling) 0.25: array_allocate no longer truncates the array diff --git a/io/io_timeouted.c b/io/io_timeouted.c index 4f72fe4..8ba8bf8 100644 --- a/io/io_timeouted.c +++ b/io/io_timeouted.c @@ -14,5 +14,8 @@ int64 io_timeouted() { if (e->inuse && e->timeout.sec.x && taia_less(&e->timeout,&now)) return ptr; } + ptr=0; /* this is for really pathological cases, where more + connections come in all the time and so the timeout + handling does not trigger initially */ return -1; }