From a620b647dd610f693784f80a4f29c19131ac9b54 Mon Sep 17 00:00:00 2001
From: Brandon Rodriguez <brodriguez8774@gmail.com>
Date: Sat, 9 Dec 2017 20:38:58 -0500
Subject: [PATCH] Actually use threading instead of single thread

---
 Main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Main.c b/Main.c
index 4f4bf76..83cdf98 100644
--- a/Main.c
+++ b/Main.c
@@ -187,7 +187,7 @@ int main(int argc, char* argv[]) {
             // A connection has been established. Open new thread.
             char* ip = inet_ntoa(client_address->sin_addr);
             printf("Client IP: %s     Conn FD: %d\n", ip, *conn_fd);
-            pthread_create(&thread_array[0], &attr, serve_request, (void*) &((struct conn_obj) {copy_int(&index), conn_fd, client_address}));
+            pthread_create(&thread_array[index], &attr, serve_request, (void*) &((struct conn_obj) {copy_int(&index), conn_fd, client_address}));
         }
 
         // Check if any threads have finished. If so, join.
-- 
GitLab