[core] close backend socket fds more quickly
(thx ThomasDevoogdt)
close backend socket fds more quickly by polling with zero timeout when
there are pending fds scheduled to be closed after the next poll.
x-ref:
"Slow request handling in Lighttpd 1.4.60"
@@ -339,7 +339,7 @@ fdevent_sched_run (fdevents * const ev)
int
fdevent_poll (fdevents * const ev, const int timeout_ms)
{
- const int n = ev->poll(ev, timeout_ms);
+ const int n = ev->poll(ev, ev->pendclose ? 0 : timeout_ms);
if (n >= 0)
fdevent_sched_run(ev);
else if (errno != EINTR)
