Fix the app flow when a host SSL certificate isn't trusted
This commit is contained in:
parent
d7a4179d78
commit
ba2278b048
@ -337,7 +337,7 @@ void NymeaConnection::onDisconnected()
|
|||||||
if (!m_currentTransport && m_transportCandidates.isEmpty()) {
|
if (!m_currentTransport && m_transportCandidates.isEmpty()) {
|
||||||
qDebug() << "Last connection dropped.";
|
qDebug() << "Last connection dropped.";
|
||||||
QTimer::singleShot(1000, this, [this](){
|
QTimer::singleShot(1000, this, [this](){
|
||||||
if (m_currentHost) {
|
if (m_currentHost && m_connectionStatus != ConnectionStatusSslUntrusted) {
|
||||||
qDebug() << "Trying to reconnect..";
|
qDebug() << "Trying to reconnect..";
|
||||||
connectInternal(m_currentHost);
|
connectInternal(m_currentHost);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,4 +107,7 @@ Dialog {
|
|||||||
onAccepted: {
|
onAccepted: {
|
||||||
engine.connection.acceptCertificate(certDialog.url, certDialog.pem)
|
engine.connection.acceptCertificate(certDialog.url, certDialog.pem)
|
||||||
}
|
}
|
||||||
|
onRejected: {
|
||||||
|
engine.connection.disconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user