summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2016-11-01 14:42:35 +0100
committerOliver Wolff <oliver.wolff@qt.io>2016-11-03 09:28:27 +0000
commit67c6d0f54ea6244ef9c1af737ab8cbe35815f694 (patch)
tree5bc75862d15a01d07cf31a2a50e70e7dbd44c848
parentb787977ba0c266c157db9d0275e0fe9b7ae5d35f (diff)
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>
-rw-r--r--src/network/socket/qnativesocketengine_winrt.cpp3
1 files changed, 0 insertions, 3 deletions
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;