summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)) {