summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 00:15:03 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 00:15:03 (GMT)
commit47b96ccf100da33910cbc534035c00aa4b2b533d (patch)
tree08c05e7480ff90c00b36e3c4891ef0829a774a87 /src
parent70fc1c298b957b54d498b518ddf786694d3001cc (diff)
downloadQt-47b96ccf100da33910cbc534035c00aa4b2b533d.zip
Qt-47b96ccf100da33910cbc534035c00aa4b2b533d.tar.gz
Qt-47b96ccf100da33910cbc534035c00aa4b2b533d.tar.bz2
Don't try to migrate finished or aborted requests.
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index b9206be..f4e8264 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -573,7 +573,11 @@ void QNetworkReplyImplPrivate::finished()
qDebug() << "Download hasn't finished";
if (migrateBackend()) {
- return;
+ // either we are migrating or the request is finished/aborted
+ if (state == Reconnecting) {
+ resumeNotificationHandling();
+ return; // exit early if we are migrating.
+ }
} else {
qDebug() << "Could not migrate backend, application needs to send another requeset.";
error(QNetworkReply::TemporaryNetworkFailureError, q->tr("Temporary network failure."));
@@ -812,7 +816,7 @@ bool QNetworkReplyImplPrivate::migrateBackend()
if (state == QNetworkReplyImplPrivate::Finished ||
state == QNetworkReplyImplPrivate::Aborted) {
qDebug() << "Network reply is already finished/aborted.";
- return false;
+ return true;
}
if (!qobject_cast<QNetworkAccessHttpBackend *>(backend)) {