Skip to content

Fixed timer leaks in ChannelAsyncOperation.EndAsync#3669

Merged
marcschier merged 4 commits into
OPCFoundation:masterfrom
steklabs:bugfix/async-operation-timer-leaks
Apr 16, 2026
Merged

Fixed timer leaks in ChannelAsyncOperation.EndAsync#3669
marcschier merged 4 commits into
OPCFoundation:masterfrom
steklabs:bugfix/async-operation-timer-leaks

Conversation

@KarenKrill

Copy link
Copy Markdown
Contributor

Fixed timer leaks in ChannelAsyncOperation.EndAsync

Proposed changes

  • Added linked cancellation token source for delay task (runtimes <= .NET 6.0)
  • Added delay task cancellation (runtimes <= .NET 6.0)

Related Issues

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

@CLAassistant

CLAassistant commented Apr 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.63%. Comparing base (abc813f) to head (96aaaa4).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...k/Opc.Ua.Types/Polyfills/System.Threading.Tasks.cs 0.00% 16 Missing ⚠️
...ack/Opc.Ua.Core/Stack/Tcp/ChannelAsyncOperation.cs 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3669      +/-   ##
==========================================
- Coverage   71.66%   71.63%   -0.03%     
==========================================
  Files         517      517              
  Lines      113515   113530      +15     
  Branches    19073    19075       +2     
==========================================
- Hits        81349    81328      -21     
- Misses      26744    26775      +31     
- Partials     5422     5427       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcschier

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@KarenKrill

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 3669 in repo OPCFoundation/UA-.NETStandard

@marcschier

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@marcschier
marcschier merged commit fc21f2d into OPCFoundation:master Apr 16, 2026
95 of 97 checks passed
@KarenKrill
KarenKrill deleted the bugfix/async-operation-timer-leaks branch April 16, 2026 16:07
KarenKrill added a commit to steklabs/UA-.NETStandard.Fork that referenced this pull request Apr 17, 2026
* Fixed timer leaks in ChannelAsyncOperation.EndAsync (added delay task cancellation)

* Added WaitAsync with timeout PolyFill extension for versions <= .NET 6.0

* The ChannelAsyncOperation.EndAsync has been unified across all .NET versions using polyfills for older versions (< .NET 6.0)

* Fixed missing "using" operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use task.WaitAsync(timeout, ct) with polyfills - was: Async operation timer leaks

3 participants