Browse Source

[core] adjust server overload check

do not re-enable sockets if there are any connections in fdwaitqueue
(server_overload_check() now better mirrors server_load_check())
master
Glenn Strauss 5 months ago
parent
commit
311d4b0ef4
  1. 6
      src/server.c

6
src/server.c

@ -1043,11 +1043,11 @@ static void server_sockets_disable (server *srv) {
__attribute_cold__
static void server_overload_check (server *srv) {
if (srv->cur_fds + (int)srv->fdwaitqueue.used < srv->max_fds_lowat
&& srv->conns.used < srv->max_conns) {
if (srv->fdwaitqueue.used)
return;
if (srv->cur_fds < srv->max_fds_lowat && srv->conns.used < srv->max_conns)
server_sockets_enable(srv);
}
}
static void server_load_check (server *srv) {

Loading…
Cancel
Save