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

Stop FileWatcher default instance on dedicated server exit #1761

Conversation

sciwhiz12
Copy link
Member

This PR is a backport of #1757 to 1.21.3, which #1626 by stopping the default FileWatcher instance when the dedicated server instance exits (from DedicatedServer#onServerExit()). See that PR for more details on the fix.

This prevents the FileWatcher instance from blocking the JVM from
exiting normally, as the instance keeps alive a non-daemon thread (and
the JVM waits on all non-daemon threads to exit).

Fixes neoforged#1626
@sciwhiz12 sciwhiz12 added bug A bug or error backport Backport to an older version from a newer version 1.21.3 Targeted at Minecraft 1.21.3 labels Dec 11, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Dec 11, 2024

  • Publish PR to GitHub Packages

Last commit published: 7e3eccf58ca14203e2ffed796855dfc48cdd770a.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #1761' // https://github.com/neoforged/NeoForge/pull/1761
        url 'https://prmaven.neoforged.net/NeoForge/pr1761'
        content {
            includeModule('net.neoforged', 'testframework')
            includeModule('net.neoforged', 'neoforge')
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr1761.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1761
cd NeoForge-pr1761
curl -L https://prmaven.neoforged.net/NeoForge/pr1761/net/neoforged/neoforge/21.3.59-pr-1761-fix-1.21.3-GH-1626-filewatcher-dediserver-shutdown/mdk-pr1761.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

@TelepathicGrunt TelepathicGrunt merged commit 41791a0 into neoforged:1.21.3 Dec 11, 2024
7 checks passed
@neoforged-releases
Copy link

🚀 This PR has been released as NeoForge version 21.3.58.

@sciwhiz12 sciwhiz12 deleted the fix/1.21.3/GH-1626-filewatcher-dediserver-shutdown branch December 11, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.3 Targeted at Minecraft 1.21.3 backport Backport to an older version from a newer version bug A bug or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants