Browse Source

[core] handle fds pending close after poll timeout (fixes #2827)

handle fds pending close whether or not new events are triggered

(thx davidm)

x-ref:
  "POST to mod_cgi sometimes hangs"
  https://redmine.lighttpd.net/issues/2827
personal/stbuehler/cleanup-build
Glenn Strauss 4 years ago
parent
commit
8ed588ce32
  1. 3
      src/server.c

3
src/server.c

@ -2085,13 +2085,14 @@ static int server_main (server * const srv, int argc, char **argv) {
(*handler)(srv, context, revents);
}
} while (--n > 0);
fdevent_sched_run(srv, srv->ev);
} else if (n < 0 && errno != EINTR) {
log_error_write(srv, __FILE__, __LINE__, "ss",
"fdevent_poll failed:",
strerror(errno));
}
if (n >= 0) fdevent_sched_run(srv, srv->ev);
for (ndx = 0; ndx < srv->joblist->used; ndx++) {
connection *con = srv->joblist->ptr[ndx];
connection_state_machine(srv, con);

Loading…
Cancel
Save