fix(dcl): bind the reconnect re-subscribe loop to its session; shared supervisory advise ignores the first caller's token (DCL-4, DCL-9, WP3 task 3.3)
This commit is contained in:
@@ -215,10 +215,13 @@ public class OpcUaDataConnection
|
||||
IReadOnlyList<string> tagPaths, SubscriptionCallback callback, CancellationToken cancellationToken = default)
|
||||
{
|
||||
EnsureConnected();
|
||||
// Dereference the session's client ONCE (DCL-4): a reconnect swaps _client, and a call
|
||||
// must run entirely against the client it started on.
|
||||
var client = _client!;
|
||||
|
||||
// ONE shared callback for the whole batch — the client hands back the node id
|
||||
// (== tag path for OPC UA), so no per-tag closure is needed.
|
||||
var outcomes = await _client!.CreateSubscriptionsAsync(
|
||||
var outcomes = await client.CreateSubscriptionsAsync(
|
||||
tagPaths,
|
||||
(nodeId, value, timestamp, statusCode) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user