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
transport: don't add connection to multiplexer if init fails #3931
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3931 +/- ##
==========================================
+ Coverage 83.04% 83.15% +0.11%
==========================================
Files 145 145
Lines 14595 14594 -1
==========================================
+ Hits 12120 12135 +15
+ Misses 1990 1979 -11
+ Partials 485 480 -5
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered calling getMultiplexer().AddConn
later, after the code paths that can error (maybe even directly before t.listen
)?
Thanks! Yes, I think your suggestion makes sense, I will change it accordingly. |
We cannot update quic-go yet because quic-go/quic-go#3931 has not been included into any release, and our tests breaks without this commit. I am going to write a backport for such a diff soon, so that we unblock upgrading quic-go. This work is part of quic-go/quic-go#3931.
We cannot update quic-go yet because quic-go/quic-go#3931 has not been included into any release, and our tests breaks without this commit. I am going to write a backport for such a diff soon, so that we unblock upgrading quic-go. This work is part of ooni/probe#2503.
This commit backports 538b356. We cannot update quic-go yet because quic-go/quic-go#3931 has not been included into any release, and our tests breaks without this commit. I am going to write a backport for such a diff soon, so that we unblock upgrading quic-go. This work is part of ooni/probe#2503.
We cannot update quic-go yet because quic-go/quic-go#3931 has not been included into any release, and our tests breaks without this commit. I am going to write a backport for such a diff soon, so that we unblock upgrading quic-go. This work is part of ooni/probe#2503.
This diff removes a net.PacketConn from the multiplexer when (*Transport).init fails.
Background: As far as I am aware, a PacketConn is only removed from the multiplexer, when (*Transport).listen returns.
If (*Transport).init returns early, the listen() goroutine is not started, while the PacketConn was already added to the multiplexer, which results in the inability of the Transport to remove the PacketConn entry from the multiplexer.