Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release 1.4.371.91 in master #2163

Merged
merged 5 commits into from
May 27, 2023
Merged

Merge release 1.4.371.91 in master #2163

merged 5 commits into from
May 27, 2023

Conversation

mregen
Copy link
Contributor

@mregen mregen commented May 26, 2023

Update master with latest release commits.

mrsuciu and others added 5 commits May 19, 2023 08:41
…ver. (#2152)

Currently only the first endpoint of the server will initiate a reverse connection, resulting in the possibility to connect only to it. This change enables connection to all the server's endpoints via reverse connect.
Fix a few cases (not all) where TCS are not properly disposed. Specifically BeginConnect, which may cause resource leaks.
…2155)

Cherry pick bugfix from #2146:
ReadExtensionObject returns partial JSON for some types.
It appears that this is due to the JSON being read before the JsonTextWriter is closed.

see also: 2a4ba56

Co-authored-by: Markus Horstmann <markushorstmann@hotmail.com>
#2143)

Currently the session reconnect requires to create and destroy the object and to lock the operation in the client code.
The refactored version is backward compatible but allows for a single instance to handle reconnects during the lifetime of the client. In addition no more locking is necessary in the client code.
- exponential backoff is enabled by using a constructor  `new SessionReconnectHandler( true, 30000);` which would set the maxReconnectPeriod` to 30000ms. The backoff period is doubled after every unsuccessful request.
- a 10% random jitter is added to every timer update.
- The `public virtual int JitteredReconnectPeriod(int reconnectPeriod)` and `public virtual int CheckedReconnectPeriod(int reconnectPeriod, bool exponentialBackoff = false)` can be overloaded to implement custom jitter and backoff implementations.
- A new `ISession.MinPublishRequestCount` property can be set to enforce a minimum number of active publish requests. Default behavior is one publish request per subscription. It can help for low latency high frequency publish intervals.
-  A new `PublishSequenceNumbersToAcknoledge` event is implemented which allows to defer ack of sequence numbers until fully processed by the client.
All new methods/properties ar not breaking changes and by default there is no behavior change, all existing code should work and compile aginst the update flawlessly.
- A bugfix in the reconnect handler, when a server changed the application certificate the reconnect ends up in an endless loop, because the `EndpointDescription` is not updated. The fix updates the endpoint from the server if a `BadSecurityChecksFailed` error os returned and then tries to reconnect with a new session.
…nnect (#2160)

- due to the new `MinPublishRequestCount` property publish requests are being sent after reconnect even if no subscription is active
- Improve sample code to show how to dispose the old session after reconnect
@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #2163 (a81a696) into master (ae7f8e5) will increase coverage by 0.01%.
The diff coverage is 37.56%.

@@            Coverage Diff             @@
##           master    #2163      +/-   ##
==========================================
+ Coverage   58.18%   58.20%   +0.01%     
==========================================
  Files         324      324              
  Lines       61743    64447    +2704     
==========================================
+ Hits        35926    37509    +1583     
- Misses      25817    26938    +1121     
Impacted Files Coverage Δ
Libraries/Opc.Ua.Client/SessionAsync.cs 78.39% <0.00%> (-0.40%) ⬇️
Libraries/Opc.Ua.Client/Subscription.cs 72.87% <0.00%> (-0.72%) ⬇️
...ack/Opc.Ua.Core/Stack/Transport/AsyncResultBase.cs 60.78% <0.00%> (-7.91%) ⬇️
Stack/Opc.Ua.Core/Types/Encoders/JsonDecoder.cs 82.54% <0.00%> (-0.08%) ⬇️
Libraries/Opc.Ua.Client/ReverseConnectManager.cs 52.67% <25.00%> (-8.57%) ⬇️
Libraries/Opc.Ua.Client/Session.cs 66.85% <37.28%> (-0.93%) ⬇️
Libraries/Opc.Ua.Client/SessionReconnectHandler.cs 41.08% <37.71%> (-7.38%) ⬇️
Stack/Opc.Ua.Core/Stack/Server/ServerBase.cs 71.93% <100.00%> (-0.06%) ⬇️
...k/Opc.Ua.Core/Stack/Tcp/UaSCBinaryClientChannel.cs 64.89% <100.00%> (+0.34%) ⬆️

... and 42 files with indirect coverage changes

@mregen mregen merged commit d8f8a4e into master May 27, 2023
74 of 76 checks passed
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.

None yet

2 participants