From 67c6d0f54ea6244ef9c1af737ab8cbe35815f694 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 1 Nov 2016 14:42:35 +0100 Subject: 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 --- src/network/socket/qnativesocketengine_winrt.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp index 7ea4d135f4..62bc8ca683 100644 --- a/src/network/socket/qnativesocketengine_winrt.cpp +++ b/src/network/socket/qnativesocketengine_winrt.cpp @@ -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; -- cgit v1.2.3