From 6c37cad87d4a923fca2f0d05b9384bdf44da6033 Mon Sep 17 00:00:00 2001 From: kblaschke Date: Fri, 2 May 2014 13:54:42 +0200 Subject: [PATCH] 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. --- Net/src/HTTPServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Net/src/HTTPServer.cpp b/Net/src/HTTPServer.cpp index b6f781725..2717e960f 100644 --- a/Net/src/HTTPServer.cpp +++ b/Net/src/HTTPServer.cpp @@ -70,8 +70,8 @@ HTTPServer::~HTTPServer() void HTTPServer::stopAll(bool abortCurrent) { - _pFactory->serverStopped(this, abortCurrent); stop(); + _pFactory->serverStopped(this, abortCurrent); }