diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-02-03 12:16:35 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-02-04 12:09:42 (GMT) |
commit | 8fe811e14b6db6a9637a5bf6d276613786291762 (patch) | |
tree | 1e23b78e69072d703870e8f27e12e5ff4153f6be /src/network/access | |
parent | 231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c (diff) | |
download | Qt-8fe811e14b6db6a9637a5bf6d276613786291762.zip Qt-8fe811e14b6db6a9637a5bf6d276613786291762.tar.gz Qt-8fe811e14b6db6a9637a5bf6d276613786291762.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.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index ea18367..5b518de 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1369,10 +1369,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()); } |