mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-21 17:16:16 +08:00
3b3305355b
Force a fresh queue check after transfer so the first Publish returns saved data instead of an empty keep-alive. Reset the subscription’s expiration counter after transfer. Add tests for queued data delivery, the timing bug, and an empty keep-alive after all queued values have been delivered. # Description A durable subscription could return an empty keep-alive on the first Publish after transfer, even when values had accumulated while the client was disconnected. The server could reuse its previous keep-alive state before checking the queues. This change forces a fresh queue check after transfer and resets the subscription's expiration counter. Queued values are delivered first; normal keep-alives resume once the queues are drained. Tests cover the timing bug, data delivery after reconnecting with SendInitialValues=false, and a keep-alive after draining all queued writes, including across multiple Publish responses. ## Checklist _Put an `x` in the boxes that apply. You can complete these step by step after opening the PR._ - [x] I have signed the [CLA](https://opcfoundation.org/license/cla/ContributorLicenseAgreementv1.0.pdf) and read the [CONTRIBUTING](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/CONTRIBUTING.md) doc. - [x] I have added tests that prove my fix is effective or that my feature works and increased code coverage. - [ ] I have added all necessary documentation. - [ ] I have verified that my changes do not introduce (new) build or analyzer warnings. - [ ] I ran **all** tests locally using the **UA.slnx** solution against at least .net **framework** and .net **10**, and all passed. - [ ] I fixed **all** failing and flaky tests in the CI pipelines and **all** CodeQL warnings. - [ ] I have addressed **all** PR feedback received.