Bugfix : deadlock when closing the server

Caused by a non-recursive mutex
This commit is contained in:
Palakis 2017-02-23 21:25:26 +01:00
parent 3d68b7c9e5
commit 0ff4411abf

View File

@ -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();