Skip to content

Limit the wait for community news at launch - #3072

Merged
Licho1 merged 2 commits into
ZeroK-RTS:masterfrom
moss-orbit-9f339e:launcher-community-info-timeout
Nov 9, 2026
Merged

Licho1 merged 2 commits into
ZeroK-RTS:masterfrom
moss-orbit-9f339e:launcher-community-info-timeout

Conversation

@moss-orbit-9f339e

Copy link
Copy Markdown
Contributor

The launcher loads community news before it starts the engine, also for Steam. When the server does not answer, this blocked the start for 100 s (HttpClient default), or about 134 s on Mono when the TCP connect gets no reply.
News is optional, so this change stops the wait after 10 s. The engine then starts with the existing news file.
Tested with the real ContentServiceClient on Mono 6.8: hung server 100 s -> 10 s, dropped connect 134 s -> 10 s; a working server still writes community.json. Not tested on the Steam build itself.

Fixes ZeroK-RTS/Chobby#931

This PR was made with AI help (Claude Code); I checked the change and the test.

🤖 Generated with Claude Code

UpdatePublicCommunityInfo runs before the engine starts, also for Steam.
When the server does not answer, the launcher waited for the HttpClient
default (100 s) or longer: on Mono a dropped TCP connect waits for the
OS limit (about 130 s). The news is optional, so stop after 10 s and
start the engine with the existing news file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The launcher calls this on its UI thread. Running the query with Task.Run
keeps its continuations off that thread, so waiting on it cannot deadlock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Licho1
Licho1 enabled auto-merge (squash) November 9, 2026 18:54
@Licho1
Licho1 merged commit a4ebbef into ZeroK-RTS:master Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When the server is down steam-install of zero-k takes an abnormally long time to launch when networking is turned on.

2 participants