From e3be03ea73235df7fbab783ccafb8a42a85159bc Mon Sep 17 00:00:00 2001 From: Paulchen Panther Date: Thu, 20 Dec 2018 15:16:23 +0100 Subject: [PATCH] Close client connection on stop --- libsrc/webconfig/QtHttpServer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libsrc/webconfig/QtHttpServer.cpp b/libsrc/webconfig/QtHttpServer.cpp index 89207434..d58b6aed 100644 --- a/libsrc/webconfig/QtHttpServer.cpp +++ b/libsrc/webconfig/QtHttpServer.cpp @@ -64,6 +64,12 @@ void QtHttpServer::start (quint16 port) { void QtHttpServer::stop (void) { if (m_sockServer->isListening ()) { m_sockServer->close (); + // disconnect clients + const QList socks = m_socksClientsHash.keys(); + for(auto sock : socks) + { + sock->close(); + } emit stopped (); } }