summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2011-02-24 10:19:36 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2011-02-24 10:58:04 (GMT)
commit473ff22f9d84c407c5a2011defcf07f19527a056 (patch)
tree57ab3f6553c5d40269bf0acdd3dc4594d40f8c65 /src/network/access/qhttpnetworkconnection.cpp
parentf46cf4384f74b6b17674db8abdcdae7d492ff0f7 (diff)
downloadQt-473ff22f9d84c407c5a2011defcf07f19527a056.zip
Qt-473ff22f9d84c407c5a2011defcf07f19527a056.tar.gz
Qt-473ff22f9d84c407c5a2011defcf07f19527a056.tar.bz2
QNAM HTTP: Be more strict with HTTP channel state
This fixes a case where finished() and finishedWithError() were both emitted for a single reply. Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index e94b099..3502113 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -286,7 +286,13 @@ void QHttpNetworkConnectionPrivate::emitReplyError(QAbstractSocket *socket,
int i = indexOf(socket);
// remove the corrupt data if any
reply->d_func()->eraseData();
+
+ // Clean the channel
channels[i].close();
+ channels[i].reply = 0;
+ channels[i].request = QHttpNetworkRequest();
+ channels[i].requeueCurrentlyPipelinedRequests();
+
// send the next request
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
}