winrt: set error if tcp socket initialization fails

Change-Id: I31a2684ffdc864c69fe896829bca860e88c4a6ca
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
bb10
Oliver Wolff 2014-05-07 13:35:14 +02:00 committed by The Qt Project
parent 9cd7403801
commit 7e9f08302c
1 changed files with 4 additions and 1 deletions

View File

@ -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;