-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
swarm: skip dialing WebTransport addresses when we have QUIC addresses #1756
Conversation
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.
Do I understand correctly that this would drop all webtransport addresses in case there is a single quic address?
In case a node advertises the following two address, the local node should still dial both, right?
"/ip4/1.2.3.4/udp/443/quic
"/ip4/5.6.7.8/udp/443/quic/webtransport
In other words, only if the addresses are equal on everything before quic
, only then should the QUIC address replace the webtransport address.
Does that make sense?
Yes, that would be better, but also more code. Not sure if it's worth the complexity. |
Actually, this probably won't be too hard. I'll update the PR. |
if isQUIC(addr) { | ||
hasQuic = true | ||
} | ||
if isWebTransport(addr) { | ||
hasWebTransport = true | ||
} |
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.
if isQUIC(addr) { | |
hasQuic = true | |
} | |
if isWebTransport(addr) { | |
hasWebTransport = true | |
} | |
hasQuic = isQuic(addr) | |
hasWebTransport = isWebTransport(addr) |
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.
Oh wait, this is not correct. The ifs are in a loop. Will revert.
cdd27b7
to
ebd6827
Compare
Merging this simple version now. We can still have better logic later (or implement the proper Happy Eyeballs fix later). |
Question: Should we have something similar for WebSocket and TCP?