summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-05-12 08:14:02 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-05-12 08:15:01 (GMT)
commit8902980cec40b25ec85ec20f79858224f68f73b6 (patch)
treeb4c1ed5c660effeed25d0b576c77a944fdbd2acb /src
parentd8af71198528c1e1c9b94471426c67e6deab7576 (diff)
downloadQt-8902980cec40b25ec85ec20f79858224f68f73b6.zip
Qt-8902980cec40b25ec85ec20f79858224f68f73b6.tar.gz
Qt-8902980cec40b25ec85ec20f79858224f68f73b6.tar.bz2
QNAM HTTP: Only force read when actual bytes available
This should fix the problem where we were showing a warning that didn't matter anyway. Task-number: QTBUG-9619
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 22dd5cb..6a13669 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -291,7 +291,8 @@ bool QHttpNetworkConnectionChannel::sendRequest()
// ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called
// this is needed if the sends an reply before we have finished sending the request. In that
// case receiveReply had been called before but ignored the server reply
- QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
+ if (socket->bytesAvailable())
+ QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
break;
}
case QHttpNetworkConnectionChannel::ReadingState: