Close listening socket before stopping running connections

If sending the serverStopped event to currently active connections
happens before actually closing the server socket, new connections will
be accepted in between, which in turn will stay open and prevent the
HTTP server from stopping completely.
This commit is contained in:
kblaschke
2014-05-02 13:54:42 +02:00
parent f9057157e8
commit 6c37cad87d

View File

@@ -70,8 +70,8 @@ HTTPServer::~HTTPServer()
void HTTPServer::stopAll(bool abortCurrent)
{
_pFactory->serverStopped(this, abortCurrent);
stop();
_pFactory->serverStopped(this, abortCurrent);
}