WinRT: Set TemporaryError in QNativeSocketEngine::accept() when no connections are pending.
This suppresses the emission of QTcpServer::acceptError() from QTcpServerPrivate::readNotification(). Task-number: QTBUG-49776 Change-Id: Icfb686d44c0a396ae2bf5867bd31a91232ef3e3c Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This commit is contained in:
parent
80ae3baed0
commit
270aa5b58d
@ -380,8 +380,10 @@ int QNativeSocketEngine::accept()
|
||||
Q_CHECK_STATE(QNativeSocketEngine::accept(), QAbstractSocket::ListeningState, -1);
|
||||
Q_CHECK_TYPE(QNativeSocketEngine::accept(), QAbstractSocket::TcpSocket, -1);
|
||||
|
||||
if (d->socketDescriptor == -1 || d->pendingConnections.isEmpty())
|
||||
if (d->socketDescriptor == -1 || d->pendingConnections.isEmpty()) {
|
||||
d->setError(QAbstractSocket::TemporaryError, QNativeSocketEnginePrivate::TemporaryErrorString);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Start processing incoming data
|
||||
if (d->socketType == QAbstractSocket::TcpSocket) {
|
||||
|
Loading…
Reference in New Issue
Block a user