Skip to content

Make important users fetch thread a daemon thread - #251

Merged
rubensworks merged 1 commit into
master-26from
fix-important-users-daemon-thread
Oct 3, 2026
Merged

rubensworks merged 1 commit into
master-26from
fix-important-users-daemon-thread

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Problem

ImportantUsers.checkAll() runs on every startup, on all loaders. It downloads users.txt on a non-daemon thread, and IOUtils.toString(URL) has no timeouts.

The MC 26.3 client no longer calls System.exit(0) on quit, and on NeoForge the vanilla shutdown watchdog fallback crashes (FML closes the minecraft module first). So if that download stalls, for example on a network that silently drops packets, quitting the game hangs until the download finishes or the process is killed. Normally the thread ends within a second, so this is unlikely in practice.

Related: CyclopsMC/IntegratedDynamics#1758, CyclopsMC/IntegratedTerminals#231.

Fix

Create the thread as a named daemon thread through a small createThread helper.

Tests

  • New unit test TestImportantUsers#testThreadIsDaemon. I checked that it fails with setDaemon(false) and passes with the fix.
  • ./gradlew build passes, and runGameTestServer passes on NeoForge, Forge and Fabric.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vnbsy6rjJEtuZqgw36BQ7d


Generated by Claude Code

The thread downloading the important users list was non-daemon and has
no timeout. Since the 26.3 client no longer calls System.exit on quit,
a stalled download could keep the JVM alive after quitting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vnbsy6rjJEtuZqgw36BQ7d
@rubensworks
rubensworks merged commit 2362bb7 into master-26 Oct 3, 2026
3 checks passed
@rubensworks
rubensworks deleted the fix-important-users-daemon-thread branch October 3, 2026 14:26
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 31.544% (+0.01%) from 31.531% — fix-important-users-daemon-thread into master-26

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.

3 participants