Fix HTTP Server rarely throwing on server restart

I don't know if this issue has been fixed YET, what I did to test was do
a bunch of /restart at the same time, seems to have worked.

The server will only start when the server is starting.
I also added a little check to the HttpThread to check if the server is
shutting down - if it is, will properly kill the http server. Don't know
if it works.