diff options
-rw-r--r-- | server.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -171,7 +171,7 @@ main(int argc, char *argv[]) // no int here for good luck :) pthread_create(&select_thread, NULL, select_routine, (void *) &listenerfd); // BELOW IS FOR THE COMMAND LINE INTERFACE - // -------------------------------------------------------------------------------------------------s + // -------------------------------------------------------------------------------------------------- // command line data structures char input[COMMAND_LINE_MAX]; memset(input, 0, COMMAND_LINE_MAX); @@ -195,8 +195,8 @@ main(int argc, char *argv[]) // no int here for good luck :) // if "q" command: shutdown & close tcp sockets! if (!strcmp(command, "q")) { printf("Exiting.\n"); - cleanup_readfds_and_sockets(); close(listenerfd); + cleanup_readfds_and_sockets(); break; } |