Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb47349' into 'mer-5.6'
Check alternative connections when connecting

See merge request mer-core/qtbase!51
  • Loading branch information
llewelld committed Dec 2, 2019
2 parents 7a6bb23 + 22410ac commit 2b1c9f3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/network/access/qnetworkaccessmanager.cpp
Expand Up @@ -1651,19 +1651,14 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession
Q_Q(QNetworkAccessManager);
qCDebug(lcNetworkAccess) << "QNAM: network session state changed:" << state;

if ((state == QNetworkSession::Connecting) && (!getNetworkSession())) {
qCWarning(lcNetworkAccess) << "QNAM: ignoring Connecting state received after the session closed";
return;
}

bool reallyOnline = false;
//Do not emit the networkSessionConnected signal here, except for roaming -> connected
//transition, otherwise it is emitted twice in a row when opening a connection.
if (state == QNetworkSession::Connected && lastSessionState != QNetworkSession::Roaming)
emit q->networkSessionConnected();
lastSessionState = state;

if (state == QNetworkSession::Disconnected) {
if ((state == QNetworkSession::Disconnected) || (state == QNetworkSession::Connecting)) {
Q_FOREACH (const QNetworkConfiguration &cfg, networkConfigurationManager.allConfigurations()) {
if (cfg.state().testFlag(QNetworkConfiguration::Active)) {
reallyOnline = true;
Expand Down

0 comments on commit 2b1c9f3

Please sign in to comment.