From c4e6d8f5fa460419ca1a55f5bb354d9c2d6e1adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 29 Apr 2022 17:18:23 +0200 Subject: [PATCH] QtHttp: Lower the severity of some log output The output was only printed if the request was no longer available queued, meaning that it had been removed before the socket had finished its connection attempt. That means the result of the attempt is not of much interest to the user so we should not print it out as a warning. The reason for why the request was removed from the queue would be the interesting bit, but it's not covered here. Task-number: QTBUG-85248 Change-Id: Iac483b8bb600e1577fe88c3699e46d50615bfccb Reviewed-by: Timur Pocheptsov (cherry picked from commit 373285857f5b68537db48244d61de3f755b0d95f) Reviewed-by: Qt Cherry-pick Bot --- src/network/access/qhttpnetworkconnection.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 2edb0f5a469..d82fb46356f 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -1256,11 +1256,10 @@ void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(const QHostInfo &info) emitReplyError(channels[0].socket, currentReply, QNetworkReply::HostNotFoundError); } } else { - // Should not happen: we start a host lookup before sending a request, - // so it's natural to have requests either in HTTP/2 queue, or in low/high - // priority queues. - qWarning("QHttpNetworkConnectionPrivate::_q_hostLookupFinished" - " could not de-queue request, failed to report HostNotFoundError"); + // We can end up here if a request has been aborted or otherwise failed (e.g. timeout) + // before the host lookup was finished. + qDebug("QHttpNetworkConnectionPrivate::_q_hostLookupFinished" + " could not de-queue request, failed to report HostNotFoundError"); networkLayerState = QHttpNetworkConnectionPrivate::Unknown; } }