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

fix: abort connection only when abortConnectionOnPingFailure is true #2684

Merged

Conversation

sumitvekariya
Copy link
Contributor

@sumitvekariya sumitvekariya commented Sep 6, 2024

Title

fix: abort connection only when abortConnectionOnPingFailure is true

Description

#2678
This implementation does the following:

  1. It checks if abortConnectionOnPingFailure is not explicitly set to false.
  2. If it's not false (by default true), it aborts the connection.
  3. If it's false, it logs a warning but doesn't abort the connection.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@sumitvekariya sumitvekariya requested a review from a team as a code owner September 6, 2024 07:30
@sumitvekariya sumitvekariya changed the title fix(ConnectionMonitor): abort connection only when abortConnectionOnPingFailure is true fix: abort connection only when abortConnectionOnPingFailure is true Sep 6, 2024
@achingbrain
Copy link
Member

Thank you for opening this. Please can you add a test to prevent future regressions?

@sumitvekariya
Copy link
Contributor Author

sumitvekariya commented Sep 6, 2024

Thank you for opening this. Please can you add a test to prevent future regressions?

test cases added

@maschad
Copy link
Member

maschad commented Sep 7, 2024

Thanks for taking this on @sumitvekariya , it seems like you have some build errors

Please ensure you read through the README.md particularly the development section before opening the PR for review so that the PR builds and tests pass before review.

@sumitvekariya
Copy link
Contributor Author

Thanks for taking this on @sumitvekariya , it seems like you have some build errors

Please ensure you read through the README.md particularly the development section before opening the PR for review so that the PR builds and tests pass before review.

Hey, apologies, I missed the build errors, I have fixed the build errors, and tested locally, build is successful and all the test cases are passed as well

@achingbrain achingbrain merged commit 2022036 into libp2p:main Sep 10, 2024
21 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.

3 participants