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

Try other resolved IPs if one fails to connect #50365

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

timothyqiu
Copy link
Member

When HTTPClient and WebSocketClient are connecting to server, save all resolved IPs, and try other candidates if one failed to connect. Not Happy Eyeballs, but at least it's happy I think :)

Fixes #46972, and hopefully fixes #36418, I don't have IPv6 connection to the AssetLib, so I only tested on my localhost which resolved to IPv6 first.

It's the same for 3.x, but core/io/http_client_tcp.{h,cpp}core/io/http_client.{h,cpp} and container.is_empty()container.empty().

@timothyqiu timothyqiu requested review from a team as code owners July 11, 2021 10:00
@Calinou Calinou added bug cherrypick:3.3 cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:network labels Jul 11, 2021
@Calinou Calinou added this to the 4.0 milestone Jul 11, 2021
@Faless Faless self-assigned this Jul 16, 2021
Copy link
Collaborator

@Faless Faless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments about ip_candidates cleanup. Looks great otherwise 👍 🏆

modules/websocket/wsl_client.cpp Outdated Show resolved Hide resolved
core/io/http_client_tcp.cpp Show resolved Hide resolved
Copy link
Collaborator

@Faless Faless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, great job 🏆

@Faless Faless merged commit 61d681c into godotengine:master Aug 30, 2021
@Faless
Copy link
Collaborator

Faless commented Aug 30, 2021

Thanks!

@timothyqiu timothyqiu deleted the ip-candidates branch August 30, 2021 05:28
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 14, 2021
@akien-mga
Copy link
Member

akien-mga commented Sep 29, 2021

Cherry-picked for 3.3.4.

Edit: Undid cherry-pick, it requires resolve_hostname_addresses which doesn't exist in 3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants