Fix the app flow when a host SSL certificate isn't trusted

This commit is contained in:
Michael Zanetti 2019-03-14 12:37:12 +01:00
parent d7a4179d78
commit ba2278b048
2 changed files with 4 additions and 1 deletions

View File

@ -337,7 +337,7 @@ void NymeaConnection::onDisconnected()
if (!m_currentTransport && m_transportCandidates.isEmpty()) {
qDebug() << "Last connection dropped.";
QTimer::singleShot(1000, this, [this](){
if (m_currentHost) {
if (m_currentHost && m_connectionStatus != ConnectionStatusSslUntrusted) {
qDebug() << "Trying to reconnect..";
connectInternal(m_currentHost);
}

View File

@ -107,4 +107,7 @@ Dialog {
onAccepted: {
engine.connection.acceptCertificate(certDialog.url, certDialog.pem)
}
onRejected: {
engine.connection.disconnect();
}
}