WinRT: Do not try to read from TCP inputstream in case of UDP

Change-Id: I2cdf0f4c7642c420ccec0a3f6e05a1c5bc7da020
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
Oliver Wolff 2015-07-31 14:54:38 +02:00
parent 055cbaafd6
commit d8130786b6

View File

@ -1159,6 +1159,9 @@ void QNativeSocketEnginePrivate::handleConnectionEstablished(IAsyncAction *actio
socketState = QAbstractSocket::ConnectedState;
emit q->connectionReady();
if (socketType != QAbstractSocket::TcpSocket)
return;
// Delay the reader so that the SSL socket can upgrade
if (sslSocket)
QObject::connect(qobject_cast<QSslSocket *>(sslSocket), &QSslSocket::encrypted, q, &QNativeSocketEngine::establishRead);