winrt: Remove static mutex that protected handleReadyRead

At the point in time when the callback is called it is very
unlikely that another thread sets the state or error of
the socket engine. Other members (readBytes, bytesAvailable)
are protected by readMutex.

Change-Id: I76cf12fbc9019d1b42846c4b40e0cd1c06bbb220
Reviewed-by: David Faure <david.faure@kdab.com>
bb10
Oliver Wolff 2016-11-01 14:42:35 +01:00
parent b787977ba0
commit 67c6d0f54e
1 changed files with 0 additions and 3 deletions

View File

@ -1434,8 +1434,6 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async
}
locker.unlock();
static QMutex mutex;
mutex.lock();
// A read in UnconnectedState will close the socket and return -1 and thus tell the caller,
// that the connection was closed. The socket cannot be closed here, as the subsequent read
// might fail then.
@ -1488,7 +1486,6 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async
if (notifyOnRead)
emit q->readReady();
mutex.unlock();
hr = QEventDispatcherWinRT::runOnXamlThread([buffer, q, this]() {
UINT32 readBufferLength;