fix: Subscription diagnostic nodes not deleted when disabling diagnostics#3559
Merged
marcschier merged 1 commit intoOPCFoundation:masterfrom Feb 17, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3559 +/- ##
===========================================
+ Coverage 51.86% 64.72% +12.85%
===========================================
Files 370 458 +88
Lines 78618 96773 +18155
Branches 13650 16264 +2614
===========================================
+ Hits 40779 62637 +21858
+ Misses 33705 29138 -4567
- Partials 4134 4998 +864 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
romanett
approved these changes
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a bug in
DiagnosticsNodeManager.SetDiagnosticsEnabled(false)where the subscription cleanup loop indexesm_sessionsinstead ofm_subscriptions.Disclaimer: This bug has been found with hours of manual work with AI and my local OPC UA stress test application and should be safe - please review the changes as I don't really know the OPC UA code base in depth.
Bug
When
SetDiagnosticsEnabled(false)is called, the subscription cleanup loop at line 643-646 iteratesm_subscriptions.Countbut indexesm_sessions[ii]:This causes:
Subscription diagnostic nodes (and their child states and references) remain permanently in
PredefinedNodes.