[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())
@@ -1043,12 +1043,12 @@ 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) {
/* check if hit limits for num fds used or num connections */
