summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2014-05-07 13:35:14 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-06 16:52:24 +0200
commit7e9f08302cc3118f8cc6b72dc93b3e0cbfbca2a7 (patch)
tree510ad88996a08fe3a207ac7b54f4b96a42bb05df /src/network
parent9cd7403801f9dc842a4546ba793f88828cb01552 (diff)
winrt: set error if tcp socket initialization fails
Change-Id: I31a2684ffdc864c69fe896829bca860e88c4a6ca Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qnativesocketengine_winrt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp
index 22e52b3dad..1646940cb8 100644
--- a/src/network/socket/qnativesocketengine_winrt.cpp
+++ b/src/network/socket/qnativesocketengine_winrt.cpp
@@ -246,8 +246,11 @@ bool QNativeSocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket::
d->tcp = handler->pendingTcpSockets.take(socketDescriptor);
d->socketType = QAbstractSocket::TcpSocket;
- if (!d->tcp || !d->fetchConnectionParameters())
+ if (!d->tcp || !d->fetchConnectionParameters()) {
+ d->setError(QAbstractSocket::UnsupportedSocketOperationError,
+ d->InvalidSocketErrorString);
return false;
+ }
d->socketState = socketState;
return true;