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(iroh_net): less agressive best_addr clearing on pong timeout #2238

Merged

Conversation

divagant-martian
Copy link
Contributor

Description

Clears the best address only if within the time the pong should have been received, nothing else was seen so that the address is considered not alive in that period. This should result in less aggressive best_addr clearing.

Specific changes include:

  • remove BestAddr::clear_if_addr_older since it is no longer needed.
  • change BestAddr::clear* return since it was never read anyway.
  • check for alive withing the PING_TIMEOUT_DURATION before clearing the best address on timeout
  • misc docs fixes in code related to being alive/active

Breaking Changes

n/a

Notes & open questions

n/a

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@divagant-martian divagant-martian added this pull request to the merge queue Apr 26, 2024
@dignifiedquire
Copy link
Contributor

does this fix #2169?

Merged via the queue into n0-computer:main with commit 5329927 Apr 26, 2024
21 checks passed
@flub
Copy link
Contributor

flub commented Apr 26, 2024

awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

connections keep switching away from direct connection and switching back
3 participants