Skip to content

Do not block in httpfetch_request_clear() - #16303

Merged
sfan5 merged 1 commit into
luanti-org:masterfrom
sfan5:fetchhang
Jul 3, 2025
Merged

Do not block in httpfetch_request_clear()#16303
sfan5 merged 1 commit into
luanti-org:masterfrom
sfan5:fetchhang

Conversation

@sfan5

@sfan5 sfan5 commented Jun 30, 2025

Copy link
Copy Markdown
Member

fixes #16272

To do

This PR isReady for Review.

How to test

  1. edit /etc/resolv.conf to only contain a single nameserver that doesn't work
  2. launch Luanti and open the multiplayer tab to cause a http request

you should be able to start a singleplayer session normally.
Luanti will still block upon exit and the "WARNING[CurlFetch]: CurlFetchThread blocked for" message should appear.

@sfan5 sfan5 added Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines Bugfix 🐛 PRs that fix a bug labels Jun 30, 2025

@SmallJoker SmallJoker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fun fact: an unreachable nameserver also locks up sudo for a few seconds because it cannot resolve the (local) hostname. It's best not to close the editor after making changes.

I can now press "Connect" in the main menu, results in an address resolver error after a while.
The server list returns CurlFetchThread blocked for 13197ms and 10033ms respectively (1x geoip, 1x server list). Singleplayer does indeed still work.

@sfan5
sfan5 merged commit 83a7e22 into luanti-org:master Jul 3, 2025
@sfan5
sfan5 deleted the fetchhang branch July 3, 2025 15:32
PtiLuky pushed a commit to PtiLuky/luanti that referenced this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix 🐛 PRs that fix a bug One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Luanti hangs on main menu when packet can't get through

2 participants