summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@theqtcompany.com>2016-04-06 10:46:00 +0200
committerOliver Wolff <oliver.wolff@theqtcompany.com>2016-04-11 11:22:45 +0000
commitcd17321213917607fe8804f90698ff94301aa3fc (patch)
tree07ee5fdbee7ba7385fec13d44dddb86324c0a219 /src
parent14399b427cdb7662cbca6aa89443521301507b41 (diff)
winrt: Use correct socket error on socket close
Change-Id: I6d39b091e48a911534cb79d42d33d16041261cfb Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/network/socket/qnativesocketengine_winrt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp
index d1ebd19cca..0ff76adecf 100644
--- a/src/network/socket/qnativesocketengine_winrt.cpp
+++ b/src/network/socket/qnativesocketengine_winrt.cpp
@@ -1246,7 +1246,7 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async
// that the connection was closed. The socket cannot be closed here, as the subsequent read
// might fail then.
if (status == Error || status == Canceled) {
- setError(QAbstractSocket::NetworkError, RemoteHostClosedErrorString);
+ setError(QAbstractSocket::RemoteHostClosedError, RemoteHostClosedErrorString);
socketState = QAbstractSocket::UnconnectedState;
if (notifyOnRead)
emit q->readReady();
@@ -1265,7 +1265,7 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async
// the closing of the socket won't be communicated to the caller. So only the error is set. The
// actual socket close happens inside of read.
if (!bufferLength) {
- setError(QAbstractSocket::NetworkError, RemoteHostClosedErrorString);
+ setError(QAbstractSocket::RemoteHostClosedError, RemoteHostClosedErrorString);
socketState = QAbstractSocket::UnconnectedState;
if (notifyOnRead)
emit q->readReady();