diff options
author | Jannis Voelker <jannis.voelker@basyskom.com> | 2020-08-05 13:58:33 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-08-06 10:26:38 +0000 |
commit | 025223879f52410f5ece9674dca572118c061383 (patch) | |
tree | fe855b0900c254ce6fa3543a862a074c690585cd | |
parent | 6aa25021956f6ced388e86f22ac72b70fe9f8d31 (diff) |
Fix subscription sharing with revised intervals
The revised publishing interval returned by the server must be compared
to the requested publishing interval or the slowest subscription will
be the bottom line for all following monitorings.
Change-Id: I295b9522a5f305bdb26eb04d4297b844a6347f53
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
(cherry picked from commit 811deee41d99b7c619bd0aae33c3191b4c07bac3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/plugins/opcua/open62541/qopen62541backend.cpp | 2 | ||||
-rw-r--r-- | src/plugins/opcua/uacpp/quacppbackend.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/opcua/open62541/qopen62541backend.cpp b/src/plugins/opcua/open62541/qopen62541backend.cpp index f2952b9..c91dd38 100644 --- a/src/plugins/opcua/open62541/qopen62541backend.cpp +++ b/src/plugins/opcua/open62541/qopen62541backend.cpp @@ -290,7 +290,7 @@ QOpen62541Subscription *Open62541AsyncBackend::getSubscription(const QOpcUaMonit return nullptr; } m_subscriptions[id] = sub; - if (sub->interval() > settings.samplingInterval()) // The publishing interval has been revised by the server. + if (sub->interval() > settings.publishingInterval()) // The publishing interval has been revised by the server. m_minPublishingInterval = sub->interval(); // This must be a queued connection to prevent the slot from being called while the client is inside UA_Client_run_iterate(). QObject::connect(sub, &QOpen62541Subscription::timeout, this, &Open62541AsyncBackend::handleSubscriptionTimeout, Qt::QueuedConnection); diff --git a/src/plugins/opcua/uacpp/quacppbackend.cpp b/src/plugins/opcua/uacpp/quacppbackend.cpp index 627cceb..93f0fd8 100644 --- a/src/plugins/opcua/uacpp/quacppbackend.cpp +++ b/src/plugins/opcua/uacpp/quacppbackend.cpp @@ -708,7 +708,7 @@ QUACppSubscription *UACppAsyncBackend::getSubscription(const QOpcUaMonitoringPar delete sub; return nullptr; } - if (sub->interval() > settings.samplingInterval()) // The publishing interval has been revised by the server. + if (sub->interval() > settings.publishingInterval()) // The publishing interval has been revised by the server. m_minPublishingInterval = sub->interval(); m_subscriptions[id] = sub; return sub; |