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 final Reflection.Method bind = Reflection.getMethod(TinyProtocol.serverConnection, null, InetAddress.class, int.class);
|
||||||
private static void freezeInternal(Path path) throws Exception {
|
private static void freezeInternal(Path path) throws Exception {
|
||||||
Bukkit.getPluginManager().callEvent(new CRIUSleepEvent());
|
Bukkit.getPluginManager().callEvent(new CRIUSleepEvent());
|
||||||
Bukkit.getWorlds().forEach(FlatteningWrapper.impl::syncSave);
|
|
||||||
Statement.closeAll();
|
|
||||||
|
|
||||||
// Close socket
|
// Close socket
|
||||||
Object serverConnection = TinyProtocol.getServerConnection(Core.getInstance());
|
Object serverConnection = TinyProtocol.getServerConnection(Core.getInstance());
|
||||||
@@ -105,6 +103,9 @@ class CheckpointUtilsJ9 {
|
|||||||
}
|
}
|
||||||
channels.clear();
|
channels.clear();
|
||||||
|
|
||||||
|
Bukkit.getWorlds().forEach(FlatteningWrapper.impl::syncSave);
|
||||||
|
Statement.closeAll();
|
||||||
|
|
||||||
System.runFinalization();
|
System.runFinalization();
|
||||||
System.gc();
|
System.gc();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user