Merge PR #222: Fix an issue where the app might not reconnect to the core.
This commit is contained in:
commit
b4364b8af7
@ -406,6 +406,15 @@ void NymeaConnection::updateActiveBearers()
|
|||||||
foreach (const QNetworkConfiguration &config, configs) {
|
foreach (const QNetworkConfiguration &config, configs) {
|
||||||
qDebug() << "Inactive network config:" << config.name() << config.bearerTypeFamily() << config.bearerTypeName();
|
qDebug() << "Inactive network config:" << config.name() << config.bearerTypeFamily() << config.bearerTypeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Retrying with a new config manager:
|
||||||
|
QNetworkConfigurationManager *newMan = new QNetworkConfigurationManager(this);
|
||||||
|
qDebug() << "Trying with new config manager:";
|
||||||
|
configs = newMan->allConfigurations();
|
||||||
|
foreach (const QNetworkConfiguration &config, configs) {
|
||||||
|
qDebug() << "Config:" << config.name() << config.bearerTypeFamily() << config.bearerTypeName() << config.state();
|
||||||
|
}
|
||||||
|
newMan->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_availableBearerTypes != availableBearerTypes) {
|
if (m_availableBearerTypes != availableBearerTypes) {
|
||||||
|
|||||||
@ -322,6 +322,8 @@ void JsonRpcClient::onInterfaceConnectedChanged(bool connected)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "JsonRpcClient: Transport connected. Starting handshake.";
|
qDebug() << "JsonRpcClient: Transport connected. Starting handshake.";
|
||||||
|
// Clear anything that might be left in the buffer from a previous connection.
|
||||||
|
m_receiveBuffer.clear();
|
||||||
QVariantMap params;
|
QVariantMap params;
|
||||||
params.insert("locale", QLocale().name());
|
params.insert("locale", QLocale().name());
|
||||||
sendCommand("JSONRPC.Hello", params, this, "helloReply");
|
sendCommand("JSONRPC.Hello", params, this, "helloReply");
|
||||||
|
|||||||
Reference in New Issue
Block a user