[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"
  https://redmine.lighttpd.net/boards/2/topics/10063
personal/stbuehler/tests-path
Glenn Strauss 2021-11-03 11:45:54 -04:00
parent 0f51b3728a
commit b376934b67
1 changed files with 1 additions and 1 deletions

View File

@ -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)