mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-29 07:07:24 +08:00
It fixes #2656 by including in the SystemContext (taken as an argument to the OnMonitoredNodeChanged method) the Server session related to the current MonitoredItem that is going to be passed to the QueueValue.
This commit is contained in:
@@ -294,13 +294,31 @@ namespace Opc.Ua.Server
|
||||
|
||||
if (monitoredItem.AttributeId == Attributes.Value && (changes & NodeStateChangeMasks.Value) != 0)
|
||||
{
|
||||
QueueValue(context, node, monitoredItem);
|
||||
ServerSystemContext serverSystemContext;
|
||||
if ((serverSystemContext = (context as ServerSystemContext)) != null)
|
||||
{
|
||||
ServerSystemContext context2 = serverSystemContext.Copy(new OperationContext(monitoredItem.Session, monitoredItem.DiagnosticsMasks));
|
||||
QueueValue(context2, node, monitoredItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
QueueValue(context, node, monitoredItem);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (monitoredItem.AttributeId != Attributes.Value && (changes & NodeStateChangeMasks.NonValue) != 0)
|
||||
{
|
||||
QueueValue(context, node, monitoredItem);
|
||||
ServerSystemContext serverSystemContext2;
|
||||
if ((serverSystemContext2 = (context as ServerSystemContext)) != null)
|
||||
{
|
||||
ServerSystemContext context3 = serverSystemContext2.Copy(new OperationContext(monitoredItem.Session, monitoredItem.DiagnosticsMasks));
|
||||
QueueValue(context3, node, monitoredItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
QueueValue(context, node, monitoredItem);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user