Why is this code not listening for new clients? when there is a new client, it should print hello

int main(int argc, char *argv[])
{
    User *user_list = NULL;
    // User *curr = user_list; // curr is the head of the user_list
    Client *client_list = NULL;
    // Create socket
    int listen_soc = socket(AF_INET, SOCK_STREAM, 0);
    if (listen_soc == -1)
    {
        perror("server: socket");
        exit(1);
    }
    // initialize server address
    struct sockaddr_in server;
    server.sin_family = AF_INET;
    server.sin_port = htons(PORT);
    memset(&server.sin_zero, 0, 8);
    server.sin_addr.s_addr = INADDR_ANY;
    /*
     * Releasing port as soon as my server process terminates.
     */
    int on = 1;
    int status = setsockopt(listen_soc, SOL_SOCKET, SO_REUSEADDR, (const char *)&on, sizeof(on));
    if (status == -1)
    {
        perror("setsockopt -- REUSEADDR");
    }
    memset(&server.sin_zero, 0, 8);
    // bind socket to an address
    if (bind(listen_soc, (struct sockaddr *)&server, sizeof(struct sockaddr_in)) == -1)
    {
        perror("server: bind");
        close(listen_soc);
        exit(1);
    }
    // Set up a queue in the kernel to hold pending connections.
    if (listen(listen_soc, 5) < 0)
    {
        // listen failed
        perror("listen");
        exit(1);
    }
    int max_fd = listen_soc;
    fd_set all_fds;
    FD_ZERO(&all_fds);
    FD_SET(listen_soc, &all_fds);
    int client_fd;
    while (1)
    {
        // select updates the fd_set it receives, so we always use a copy and retain the original.
        fd_set listen_fds = all_fds;
        if (select(max_fd + 1, &listen_fds, NULL, NULL, NULL) == -1)
        {
            perror("server: select");
            exit(1);
        }
        // Is it the original socket? Create a new connection ...
        if (FD_ISSET(listen_soc, &listen_fds))
        {
            client_fd = accept_connection(listen_soc, client_list);
            if (client_fd > max_fd)
            { printf("hello");            }
                     FD_SET(client_fd, &all_fds);
        }
        // Check the clients
        Client *curr_client = client_list;
        while (curr_client != NULL)
        {
            if (curr_client->fd > -1 && FD_ISSET(curr_client->fd, &listen_fds))
            {
                int client_closed = cleanup_args_for_processing(user_list, curr_client->fd, client_list);            }
            curr_client = curr_client->next;
        }
    }
    return 0;
}
