From 0ff4411abf5b1df09200abd1476df71f103e1691 Mon Sep 17 00:00:00 2001 From: Palakis Date: Thu, 23 Feb 2017 21:25:26 +0100 Subject: [PATCH] Bugfix : deadlock when closing the server Caused by a non-recursive mutex --- WSServer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/WSServer.cpp b/WSServer.cpp index 57d46191..6de8ffa9 100644 --- a/WSServer.cpp +++ b/WSServer.cpp @@ -35,7 +35,7 @@ WSServer::WSServer(QObject *parent) : QObject(parent), _wsServer(Q_NULLPTR), _clients(), - _clMutex(QMutex::NonRecursive) + _clMutex(QMutex::Recursive) { _serverThread = new QThread(); @@ -77,8 +77,6 @@ void WSServer::Stop() { pClient->close(); } - - qDeleteAll(_clients.begin(), _clients.end()); _clMutex.unlock(); _wsServer->close();