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): reconfirm best addr when receiving data on it #2255

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Apr 30, 2024

When receiving data via UDP, we were not extending the validity of the current best_addr. This would trigger expiry of the best_addr, even though it was actively being used.

This fix, extends the validity, everytime we successfully receive a UDP packet on the current best_addr.

Closes #2169

match self.0.as_mut() {
None => {
// Nothing to do
// TODO: do we want to store this regardless?
Copy link
Contributor

Choose a reason for hiding this comment

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

no, something else is supposed to set best-addr in that case. at least, i think so

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dropped

@flub
Copy link
Contributor

flub commented Apr 30, 2024

nit, the description should probably describe what this fixes and why it fixes it instead of just relying on the issue link

@dignifiedquire
Copy link
Contributor Author

nit, the description should probably describe what this fixes and why it fixes it instead of just relying on the issue link

added more details to the description

@divagant-martian divagant-martian added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 6fbf4a9 Apr 30, 2024
21 checks passed
@divagant-martian divagant-martian deleted the fix-conn-switching branch April 30, 2024 14:10
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