diff options
author | Martin Petersson <Martin.Petersson@nokia.com> | 2012-04-23 12:12:18 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-23 14:12:19 +0200 |
commit | 67aa52dfe8496135290bdcca9ac252ba5623ad1c (patch) | |
tree | 1c1b494cebf2b340c632d6d494bf4dee2beb0f57 /src/network/access | |
parent | d1c8e6deda97b014a817b703f48189e436b415f5 (diff) | |
download | qt4-tools-67aa52dfe8496135290bdcca9ac252ba5623ad1c.tar.gz |
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.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index ff6f8a05a2..3540942944 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; } |