aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/OpcUaClient.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/OpcUaClient.cpp b/src/OpcUaClient.cpp
index 91ce47b..a319f29 100644
--- a/src/OpcUaClient.cpp
+++ b/src/OpcUaClient.cpp
@@ -305,11 +305,14 @@ OpcUaClient::handleConnectError (QOpcUaErrorState *errorState)
emit certificateTrustRequested (
QStringLiteral ("The server certificate is not trusted. Accept?"));
- QEventLoop loop;
- m_certLoop = &loop;
- QTimer::singleShot (30000, &loop, &QEventLoop::quit);
- loop.exec ();
- m_certLoop = nullptr;
+ if (!m_certAccepted)
+ {
+ QEventLoop loop;
+ m_certLoop = &loop;
+ QTimer::singleShot (30000, &loop, &QEventLoop::quit);
+ loop.exec ();
+ m_certLoop = nullptr;
+ }
errorState->setIgnoreError (m_certAccepted);
}