From c315fe963ead566018f84483e47bc1988a43799f Mon Sep 17 00:00:00 2001 From: Oleh Date: Wed, 6 Nov 2024 19:16:26 +0200 Subject: [PATCH] fix: remove client using function --- server/server.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/server.c b/server/server.c index fbca6dc..340406b 100644 --- a/server/server.c +++ b/server/server.c @@ -339,11 +339,7 @@ void send_info_about_color() { perror("send"); logger_debug("Failed to send to client fd %d, removing client", clients_fds[client]); close(clients_fds[client]); - for (int j = client; j < clients_count - 1; j++) { - clients_fds[j] = clients_fds[j + 1]; - } - clients_count--; - client--; + remove_client_fd(clients_fds[client]); } } } \ No newline at end of file