From 7b51acba526fdf9877fb619a90181e468c939bb8 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 9 Feb 2023 19:44:55 +0100 Subject: [PATCH] implemented MAX_CONNECTIONS --- src/chat/server/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat/server/main.c b/src/chat/server/main.c index fdf8ab2..57803a4 100644 --- a/src/chat/server/main.c +++ b/src/chat/server/main.c @@ -41,7 +41,7 @@ int main(void) if (bind(listen_socket, (SA *) &server_addr, sizeof(server_addr)) < 0) why2_die("Failed binding socket."); //LISTEN - if (listen(listen_socket, 1) < 0) why2_die("Binding failed."); + if (listen(listen_socket, MAX_CONNECTIONS) < 0) why2_die("Binding failed."); //LOOP ACCEPT for (;;)