Browse Source

[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
master
Glenn Strauss 3 months ago
parent
commit
b376934b67
  1. 2
      src/fdevent_impl.c

2
src/fdevent_impl.c

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

Loading…
Cancel
Save