Skip to content

Commit

Permalink
Stop FileWatcher default instance on dedicated server exit (#1757)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciwhiz12 authored Dec 11, 2024
1 parent 7b47ce1 commit f8e6502
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@
return true;
}
}
@@ -277,6 +_,10 @@
@@ -277,6 +_,13 @@
if (this.queryThreadGs4 != null) {
this.queryThreadGs4.stop();
}
+ if (this.dediLanPinger != null) {
+ this.dediLanPinger.interrupt();
+ this.dediLanPinger = null;
+ }
+
+ // Neo: Forcibly stop the FileWatcher default instance, to prevent it from blocking normal JVM exit; see #1626
+ com.electronwill.nightconfig.core.file.FileWatcher.defaultInstance().stop();
}

@Override
Expand Down

0 comments on commit f8e6502

Please sign in to comment.