fix(iroh): Queue sent datagrams longer #3129
Merged
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
The problem is that while the connection to the relay server is still
being established sent packets are already being dropped while being
queued to send. This means when the connection is finally established
they are not there to be sent and depending on some scheduling luck
connections will often fail. Extending this timeout makes
establishing connections via the relay only much more reliable.
Breaking Changes
Notes & open questions
"depending on scheduling luck" is a bit hand-wavy. I would have
expected QUIC to recover from this and re-send the packets. I think
it depends on exactly how long it takes to establish the connection,
re-tries could still end up being dropped in this queue if badly
timed.
It is hard to say if 3*PTO is sufficient. There is an argument for
even longer, but it is a trade-off of blocking the entire relay queue
if it is too long and giving enough time to establish a normal connection.
Change checklist