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: Ifbb1f4732d3173a7807ac5bd0dc78fb5144faaf3
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
Martin Petersson 2012-03-14 10:44:31 +01:00 committed by Qt by Nokia
parent 9e87104295
commit d1a5bb55d9

View File

@ -357,9 +357,9 @@ 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;
}