forked from SteamWar/SteamWar
Close server socket before world saving
This commit is contained in:
@@ -94,8 +94,6 @@ class CheckpointUtilsJ9 {
|
||||
private static final Reflection.Method bind = Reflection.getMethod(TinyProtocol.serverConnection, null, InetAddress.class, int.class);
|
||||
private static void freezeInternal(Path path) throws Exception {
|
||||
Bukkit.getPluginManager().callEvent(new CRIUSleepEvent());
|
||||
Bukkit.getWorlds().forEach(FlatteningWrapper.impl::syncSave);
|
||||
Statement.closeAll();
|
||||
|
||||
// Close socket
|
||||
Object serverConnection = TinyProtocol.getServerConnection(Core.getInstance());
|
||||
@@ -105,6 +103,9 @@ class CheckpointUtilsJ9 {
|
||||
}
|
||||
channels.clear();
|
||||
|
||||
Bukkit.getWorlds().forEach(FlatteningWrapper.impl::syncSave);
|
||||
Statement.closeAll();
|
||||
|
||||
System.runFinalization();
|
||||
System.gc();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user