diff --git a/main.c b/main.c index fc58666..8eb3a11 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -70,7 +71,7 @@ int assign_workers(int* socket_fd) { memcpy(&port, buffer+1, sizeof(u_int32_t)); port = ntohl(port); printf("[Host] Unassigning port %i\n", port); - ports[11000-port] = false; + ports[abs(11000-port)] = false; shutdown(client_sock, SHUT_RDWR); close(client_sock); }