diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 72ae813..8d73d9f 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -942,6 +942,7 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev, struct winbindd_listen_state *s = talloc_get_type_abort(private_data, struct winbindd_listen_state); + bool has_idle = true; while (winbindd_num_clients() > WINBINDD_MAX_SIMULTANEOUS_CLIENTS - 1) { DEBUG(5,("winbindd: Exceeding %d client " @@ -949,6 +950,7 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev, "connection.\n", WINBINDD_MAX_SIMULTANEOUS_CLIENTS)); if (!remove_idle_client()) { + has_idle = false; DEBUG(0,("winbindd: Exceeding %d " "client connections, no idle " "connection found\n", @@ -958,7 +960,8 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev, } /* new, non-privileged connection */ - new_connection(s->fd, s->privileged); + if (has_idle) + new_connection(s->fd, s->privileged); } static bool winbindd_setup_listeners(void)