Skip to content

Commit

Permalink
Revert "#2656 Fix for - Session is not provided by ClearChangeMasks w…
Browse files Browse the repository at this point in the history
…hen a change is notified (#2772)" (#2792)

This reverts commit 9c7b321.
During manual tests the new code ran into an ArgumentNullException creating a new OperationContext.
  • Loading branch information
mregen authored Oct 11, 2024
1 parent 9c7b321 commit 0215eb5
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions Libraries/Opc.Ua.Server/Diagnostics/MonitoredNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,31 +294,13 @@ public void OnMonitoredNodeChanged(ISystemContext context, NodeState node, NodeS

if (monitoredItem.AttributeId == Attributes.Value && (changes & NodeStateChangeMasks.Value) != 0)
{
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);
}
QueueValue(context, node, monitoredItem);
continue;
}

if (monitoredItem.AttributeId != Attributes.Value && (changes & NodeStateChangeMasks.NonValue) != 0)
{
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);
}
QueueValue(context, node, monitoredItem);
continue;
}
}
Expand Down

0 comments on commit 0215eb5

Please sign in to comment.