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

Commits on May 19, 2023

  1. Allow initiation of reverse connections from all endpoints of the ser…

    …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.
    mrsuciu committed May 19, 2023
    Configuration menu
    Copy the full SHA
    24ba1d5 View commit details
    Browse the repository at this point in the history
  2. Fix possible memory leak of CancellationTokenSource (#2156)

    Fix a few cases (not all) where TCS are not properly disposed. Specifically BeginConnect, which may cause resource leaks.
    mregen committed May 19, 2023
    Configuration menu
    Copy the full SHA
    c13bb0e View commit details
    Browse the repository at this point in the history
  3. JsonDecoder: ReadExtensionObject returns partial JSON for some types (#…

    …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>
    mregen and MarkusHorstmann committed May 19, 2023
    Configuration menu
    Copy the full SHA
    0a3546a View commit details
    Browse the repository at this point in the history
  4. Refactor Sessionreconnecthandler and support subscription ack deferral (

    #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.
    mregen committed May 19, 2023
    Configuration menu
    Copy the full SHA
    7550c65 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. fix regression after reconnect and explain session dispose after reco…

    …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
    mregen committed May 24, 2023
    Configuration menu
    Copy the full SHA
    a81a696 View commit details
    Browse the repository at this point in the history