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): poll_send should drop transmits that we dont have a dest for #2393

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

ramfox
Copy link
Contributor

@ramfox ramfox commented Jun 21, 2024

Description

We've learned that if we return anything other than Ok in poll_send, we will be blocking the endpoint and ruining all connections. We should not return an error just because we don't have a proper address for the dest, instead we should log an error and wait for the connection to timeout. By returning Poll::Ready(Ok(n)), we are telling quinn to drop the n transmits that are associated with dest. When quinn doesn't receive any ACKs for those transmits, quinn end the connection with a timeout error.

Change checklist

  • Self-review.
  • Documentation updates if relevant.

@ramfox ramfox added this to the v0.19.0 milestone Jun 21, 2024
@ramfox ramfox self-assigned this Jun 21, 2024
@divagant-martian divagant-martian added this pull request to the merge queue Jun 21, 2024
Merged via the queue into main with commit aba70ea Jun 21, 2024
25 checks passed
ppodolsky pushed a commit to izihawa/iroh that referenced this pull request Jun 22, 2024
…`dest` for (n0-computer#2393)

## Description

We've learned that if we return anything other than `Ok` in `poll_send`,
we will be blocking the endpoint and ruining all connections. We should
not return an error just because we don't have a proper address for the
`dest`, instead we should log an error and wait for the connection to
timeout. By returning `Poll::Ready(Ok(n))`, we are telling quinn to drop
the `n` transmits that are associated with `dest`. When quinn doesn't
receive any `ACK`s for those transmits, quinn end the connection with a
timeout error.

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
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.

None yet

4 participants