-
Notifications
You must be signed in to change notification settings - Fork 983
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(hole-punch): don't explicitly close RESERVE
stream
#4747
Conversation
@mxinden Please feel free to weigh in with your opinion on this. Based on the above reasoning, I don't think this is particularly controversial, hence I am moving forward with this so that I can update the |
@mxinden I don't think it matters whether we drop the stream or close it properly. If we wanted to close it properly, we could do so directly after sending the message perhaps? |
I thought we fixed this in the past when still using Instead of a fix at the
In my eyes that would be the right thing to do, i.e. close right after writing the reservation request, before reading the reservation response. |
Agreed that this needs to be the permanent fix. I'll try to reproduce it using a test in
We can reintroduce that once it doesn't cause flaky tests. It doesn't make a difference for the protocol itself though :) |
I opened a PR: quinn-rs/quinn#1699. |
Description
Making a reservation on a relay involves a request-response protocol. First we send the
RESERVE
message and then we receive the relay's response. After we've received the response, we have all the information we need and the reservation is valid.It appears that on QUIC, closing the stream can fail if the other party also closed the stream already. This can result in the entire operation failing at the very end even though everything else has succeeded.
There is no reason to explicitly close the stream as the remote is not going to read from it beyond the first message anyway. The fact that we receive a response means the remote read our request.
This should resolve some of the flakiness that we've been seeing with the hole-punch interop tests.
Notes & open questions
Change checklist