summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorMartin Petersson <Martin.Petersson@nokia.com>2012-04-23 10:12:18 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-23 12:12:19 (GMT)
commit67aa52dfe8496135290bdcca9ac252ba5623ad1c (patch)
tree1c1b494cebf2b340c632d6d494bf4dee2beb0f57 /src/network/access
parentd1c8e6deda97b014a817b703f48189e436b415f5 (diff)
downloadQt-67aa52dfe8496135290bdcca9ac252ba5623ad1c.zip
Qt-67aa52dfe8496135290bdcca9ac252ba5623ad1c.tar.gz
Qt-67aa52dfe8496135290bdcca9ac252ba5623ad1c.tar.bz2
QHttpNetworkConnectionChannel: Warn if bytesAvailable and no reply
If there are no bytesAvailable and no reply then the channel can be closed without any need for this warning. Task-number: QTBUG-9315 Change-Id: Idd461a38ea932305cc227dbd68b9af61b7e855d2 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index ff6f8a0..3540942 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -336,9 +336,10 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
Q_ASSERT(socket);
if (!reply) {
- // heh, how should that happen!
- qWarning() << "QHttpNetworkConnectionChannel::_q_receiveReply() called without QHttpNetworkReply,"
- << socket->bytesAvailable() << "bytes on socket.";
+ if (socket->bytesAvailable() > 0)
+ qWarning() << "QHttpNetworkConnectionChannel::_q_receiveReply() called without QHttpNetworkReply,"
+ << socket->bytesAvailable() << "bytes on socket.";
+
close();
return;
}