summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-02-03 12:16:35 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-02-04 11:36:53 (GMT)
commit97512b51ca8addc4fe1f8b5a4f7af14a13d4fd83 (patch)
tree1f5b335d14f79de1c537b05f0c136db224ccddd3 /src/network/access
parentd0c0aaf859452349c5cd64cbdba4ebb722c7722f (diff)
downloadQt-97512b51ca8addc4fe1f8b5a4f7af14a13d4fd83.zip
Qt-97512b51ca8addc4fe1f8b5a4f7af14a13d4fd83.tar.gz
Qt-97512b51ca8addc4fe1f8b5a4f7af14a13d4fd83.tar.bz2
Fix random crashes when bearer suddenly goes down
1. QNetworkSession being deleted from the closed signal caused data abort or E32User-CBase 49 panics. (both observed) 2. Potential E32User-CBase 46 panic in ConnectionProgressNotifier::StartNotifications() Reviewed-by: Aaron Tunney Reviewed-By: Markus Goetz Task-Number: QTBUG-17196
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 7d37375..9c5a035 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -1358,10 +1358,11 @@ void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &co
networkSession = QSharedNetworkSessionManager::getSession(config);
- QObject::connect(networkSession.data(), SIGNAL(opened()), q, SIGNAL(networkSessionConnected()));
- QObject::connect(networkSession.data(), SIGNAL(closed()), q, SLOT(_q_networkSessionClosed()));
+ QObject::connect(networkSession.data(), SIGNAL(opened()), q, SIGNAL(networkSessionConnected()), Qt::QueuedConnection);
+ //QueuedConnection is used to avoid deleting the networkSession inside its closed signal
+ QObject::connect(networkSession.data(), SIGNAL(closed()), q, SLOT(_q_networkSessionClosed()), Qt::QueuedConnection);
QObject::connect(networkSession.data(), SIGNAL(stateChanged(QNetworkSession::State)),
- q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)));
+ q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
_q_networkSessionStateChanged(networkSession->state());
}