winrt: set error if tcp socket initialization fails
Change-Id: I31a2684ffdc864c69fe896829bca860e88c4a6ca Reviewed-by: Andrew Knight <andrew.knight@digia.com>bb10
parent
9cd7403801
commit
7e9f08302c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue