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

Close socket if a client stops processing responses. #2110

Merged
merged 16 commits into from
Apr 10, 2023

Conversation

mregen
Copy link
Contributor

@mregen mregen commented Mar 30, 2023

Proposed changes

  • If a client stops receiving data from a server, stop reading from the client channel and close the socket after a timeout if the client can not recover to force a reconnection.
  • simplify buffer manager, ArrayPool is already thread safe, additional locks can be removed

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • 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

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • 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.

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Merging #2110 (59109ff) into master (d65e1cf) will decrease coverage by 0.07%.
The diff coverage is 70.67%.

@@            Coverage Diff             @@
##           master    #2110      +/-   ##
==========================================
- Coverage   58.06%   58.00%   -0.07%     
==========================================
  Files         324      324              
  Lines       61681    61680       -1     
==========================================
- Hits        35818    35780      -38     
- Misses      25863    25900      +37     
Impacted Files Coverage Δ
Libraries/Opc.Ua.Server/Session/SessionManager.cs 73.15% <0.00%> (-1.01%) ⬇️
...raries/Opc.Ua.Server/Subscription/MonitoredItem.cs 47.18% <0.00%> (ø)
...k/Opc.Ua.Core/Stack/Bindings/ArraySegmentStream.cs 90.74% <ø> (ø)
.../Opc.Ua.Server/Subscription/SubscriptionManager.cs 69.88% <50.00%> (ø)
Stack/Opc.Ua.Core/Stack/Tcp/TcpServerChannel.cs 60.96% <68.18%> (-0.45%) ⬇️
Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs 67.45% <68.75%> (-3.87%) ⬇️
...c.Ua.Core/Stack/Tcp/UaSCBinaryChannel.Symmetric.cs 78.21% <69.23%> (-0.84%) ⬇️
Stack/Opc.Ua.Core/Stack/Bindings/BufferManager.cs 75.55% <87.50%> (-2.88%) ⬇️
Stack/Opc.Ua.Core/Stack/Server/ServerBase.cs 71.14% <100.00%> (ø)
Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs 63.04% <100.00%> (-6.70%) ⬇️
... and 3 more

... and 13 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mregen mregen changed the title Test a circuit breaker Close socket if a client can not keep up processing responses. Mar 31, 2023
@mregen mregen changed the title Close socket if a client can not keep up processing responses. Close socket if a client stops processing responses. Mar 31, 2023
@mregen mregen requested review from mrsuciu and ThomasNehring March 31, 2023 18:58
@mregen mregen added this to the 1.4.371.60 bug fixes milestone Apr 7, 2023
@mregen mregen self-assigned this Apr 10, 2023
@mregen mregen merged commit 67fd91c into OPCFoundation:master Apr 10, 2023
@mregen mregen deleted the backpressure2 branch April 10, 2023 18:49
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.

2 participants