-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix(ws): Add a graceful close mechanism to handle late messages and prevent errors #1129
Merged
+138
−49
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1129 +/- ##
==========================================
+ Coverage 84.39% 84.42% +0.03%
==========================================
Files 317 317
Lines 24240 24291 +51
Branches 3684 3695 +11
==========================================
+ Hits 20457 20508 +51
+ Misses 3071 3068 -3
- Partials 712 715 +3 ☔ View full report in Codecov by Sentry. |
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
2 times, most recently
from
September 5, 2024 18:47
8936459
to
7e20632
Compare
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
from
September 5, 2024 19:55
7e20632
to
f3820a5
Compare
jansegre
previously approved these changes
Sep 5, 2024
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
from
September 6, 2024 15:54
f3820a5
to
ec2e335
Compare
r4mmer
previously approved these changes
Sep 6, 2024
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
from
September 6, 2024 16:03
ec2e335
to
ec33ba9
Compare
1 task
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
from
September 6, 2024 16:13
ec33ba9
to
93369f3
Compare
r4mmer
previously approved these changes
Sep 6, 2024
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
from
September 6, 2024 16:23
93369f3
to
8721dc5
Compare
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
2 times, most recently
from
September 6, 2024 16:53
97a7f9c
to
b528909
Compare
msbrogli
force-pushed
the
fix/tx-history-streaming-graceful-close
branch
from
September 6, 2024 16:59
b528909
to
22fc4b9
Compare
jansegre
approved these changes
Sep 6, 2024
r4mmer
approved these changes
Sep 6, 2024
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
When the stream ended, an ACK message arrived late, causing an error response to be generated.
Check out the state diagram in the Reference-level explanation here: https://github.com/HathorNetwork/internal-rfcs/pull/25
Acceptance Criteria
pauseProducing
,stopProducing
, andresumeProducing
methods._started
,_paused
, and_stop
by a state machine.CLOSING
which means the streaming has ended and it is just waiting for the last ACK.Checklist
master
, confirm this code is production-ready and can be included in future releases as soon as it gets merged