diff --git a/src/server.c b/src/server.c index 673b55e..cdd4798 100644 --- a/src/server.c +++ b/src/server.c @@ -165,11 +165,13 @@ static void *serverMain(void *server) // Accept the data packet from client connfd = accept(args->sockfd, (struct sockaddr*)&cli, &len); if (connfd < 0) { + // If error is not due to lack of clients connecting, this is error if (errno != EWOULDBLOCK) { printLog("Server acccept failed!\n"); goto serverExiting; } } else { + // Client connected, creating a thread printLog("Client accepted\n"); serverSlots[serverSlotIndex].sockfd = connfd;