fix(ping): honor ping interval in case of errors#4423
Merged
mergify[bot] merged 11 commits intolibp2p:masterfrom Sep 9, 2023
Merged
fix(ping): honor ping interval in case of errors#4423mergify[bot] merged 11 commits intolibp2p:masterfrom
mergify[bot] merged 11 commits intolibp2p:masterfrom
Conversation
dariusc93
commented
Sep 1, 2023
dariusc93
commented
Sep 1, 2023
Contributor
I don't think we can make it a boolean. The behaviour we need to retain is that the first error is "free", i.e. doesn't cause any problems. We want to be compatible with an implementation that uses one stream per ping. (Do we actually have a test for that?) I am open to changing the impl here but I'd prefer if that happens in a different PR and we focus this one on the fix for the stream spam. |
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
thomaseizinger
previously requested changes
Sep 4, 2023
mxinden
reviewed
Sep 8, 2023
Member
mxinden
left a comment
There was a problem hiding this comment.
Looks good to me, but deferring to @thomaseizinger. Thank you for the work here.
thomaseizinger
approved these changes
Sep 9, 2023
This file contains hidden or 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
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.
Description
This PR adds a delay to ping connection handler after exceeding the failure rate to prevent opening a outbound stream right after an error.
Resolves #4410.
Notes & open questions
Would it be better to switchfailuresto a boolean instead?Change checklist