From 47b96ccf100da33910cbc534035c00aa4b2b533d Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 11 Feb 2010 10:15:03 +1000 Subject: Don't try to migrate finished or aborted requests. --- src/network/access/qnetworkreplyimpl.cpp | 8 ++++++-- 1 file 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(backend)) { -- cgit v0.12