diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 00:15:03 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 00:15:03 (GMT) |
commit | 47b96ccf100da33910cbc534035c00aa4b2b533d (patch) | |
tree | 08c05e7480ff90c00b36e3c4891ef0829a774a87 | |
parent | 70fc1c298b957b54d498b518ddf786694d3001cc (diff) | |
download | Qt-47b96ccf100da33910cbc534035c00aa4b2b533d.zip Qt-47b96ccf100da33910cbc534035c00aa4b2b533d.tar.gz Qt-47b96ccf100da33910cbc534035c00aa4b2b533d.tar.bz2 |
Don't try to migrate finished or aborted requests.
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 8 |
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)) { |