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

[3.3] [Net] Fix IP address resolution incorrectly locking the main thread. #51212

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Aug 3, 2021

3.3 version of #51199

This seems to be a pretty old bug, older then originally reported (at
least under certain circumstances).

The IP singleton uses a resolve queue so developers can queue hostnames
for resolution in a separate while keeping the main thread unlocked
(address-resolution OS functions are blocking, and could block for a long
time in case of network disruption).

In most places though, the address resolution function was called with
the mutex locked, causing other functions (querying status, queueing
another hostname, ecc) to block until that resolution ended.

This commit ensures that all calls to OS address resolution are done
with the mutex unlocked.
@Faless Faless added this to the 3.3 milestone Aug 3, 2021
@Faless Faless requested a review from a team as a code owner August 3, 2021 13:46
@akien-mga akien-mga merged commit 6b15d9a into godotengine:3.3 Aug 3, 2021
@akien-mga
Copy link
Member

Thanks!

@Faless Faless deleted the net/3.3_ip_lock_fix branch August 3, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants