summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp1
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 14963d0..db2b83e 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -668,6 +668,7 @@ void QNetworkAccessHttpBackend::postRequest()
// End the thread. It will delete itself from the finished() signal
thread->quit();
+ thread->wait(5000);
finished();
} else {
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 58690fa..6e49c11 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -1152,6 +1152,7 @@ void QNetworkAccessManagerPrivate::clearCache(QNetworkAccessManager *manager)
if (manager->d_func()->httpThread) {
// The thread will deleteLater() itself from its finished() signal
manager->d_func()->httpThread->quit();
+ manager->d_func()->httpThread->wait(5000);
manager->d_func()->httpThread = 0;
}
}
@@ -1161,6 +1162,7 @@ QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate()
if (httpThread) {
// The thread will deleteLater() itself from its finished() signal
httpThread->quit();
+ httpThread->wait(5000);
httpThread = 0;
}
}