Free server when we're done with it.

This frees up a lot of memory, and closes the server socket so that the
operating system doesn't have to do it, because the operating system may
take a while to actually close the socket.
This commit is contained in:
Jordan Bancino 2022-08-24 19:36:29 -04:00
parent 9378a4d369
commit d8a89c4750

View file

@ -380,6 +380,7 @@ main(int argc, char **argv)
/* Block this thread until the server is terminated by a signal /* Block this thread until the server is terminated by a signal
* handler */ * handler */
HttpServerJoin(httpServer); HttpServerJoin(httpServer);
HttpServerFree(httpServer);
finish: finish:
Log(lc, LOG_TASK, "Shutting down..."); Log(lc, LOG_TASK, "Shutting down...");