diff --git a/src/cli.c b/src/cli.c index 83f37c2..b6d1398 100644 --- a/src/cli.c +++ b/src/cli.c @@ -222,7 +222,7 @@ int main() struct sockaddr_in servaddr; // Socket creation - sockfd = socket(AF_INET, SOCK_STREAM, 0); + sockfd = socket(PF_INET, SOCK_STREAM, 0); if (sockfd == -1) { printLog("Socket creation failed!\n"); return 1; diff --git a/src/server.c b/src/server.c index cdd4798..2423d2c 100644 --- a/src/server.c +++ b/src/server.c @@ -187,6 +187,7 @@ static void *serverMain(void *server) } serverExiting: + close(args->sockfd); printLog("Server #%lu offline\n", args->id); return NULL; }