forked from SteamWar/SteamWar
Add debug output to TinyProtocol
This commit is contained in:
@@ -423,6 +423,7 @@ public class TinyProtocol {
|
|||||||
*/
|
*/
|
||||||
public final void close() {
|
public final void close() {
|
||||||
if (!closed) {
|
if (!closed) {
|
||||||
|
System.out.println("Close TinyProtocol");
|
||||||
closed = true;
|
closed = true;
|
||||||
|
|
||||||
// Remove our handlers
|
// Remove our handlers
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import de.steamwar.Reflection;
|
|||||||
import de.steamwar.sql.internal.Statement;
|
import de.steamwar.sql.internal.Statement;
|
||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
|
||||||
import net.minecraft.server.network.ServerConnectionListener;
|
import net.minecraft.server.network.ServerConnectionListener;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
@@ -112,7 +111,6 @@ class CheckpointUtilsJ9 {
|
|||||||
ServerConnectionListener serverConnection = MinecraftServer.getServer().getConnection();
|
ServerConnectionListener serverConnection = MinecraftServer.getServer().getConnection();
|
||||||
List<?> channels = channelFutures.get(serverConnection);
|
List<?> channels = channelFutures.get(serverConnection);
|
||||||
for (Object future : channels) {
|
for (Object future : channels) {
|
||||||
System.out.println(((ChannelFuture) future).channel() + ": " + ((ChannelFuture) future).channel().pipeline().names());
|
|
||||||
((ChannelFuture) future).channel().close().syncUninterruptibly();
|
((ChannelFuture) future).channel().close().syncUninterruptibly();
|
||||||
}
|
}
|
||||||
channels.clear();
|
channels.clear();
|
||||||
@@ -148,15 +146,10 @@ class CheckpointUtilsJ9 {
|
|||||||
// Reopen socket
|
// Reopen socket
|
||||||
serverConnection.startTcpServerListener(InetAddress.getLoopbackAddress(), port);
|
serverConnection.startTcpServerListener(InetAddress.getLoopbackAddress(), port);
|
||||||
for (Object future : channels) {
|
for (Object future : channels) {
|
||||||
System.out.println(((ChannelFuture) future).channel() + ": " + ((ChannelFuture) future).channel().pipeline().names());
|
|
||||||
((ChannelFuture) future).channel().config().setAutoRead(true);
|
((ChannelFuture) future).channel().config().setAutoRead(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new CRIUWakeupEvent());
|
Bukkit.getPluginManager().callEvent(new CRIUWakeupEvent());
|
||||||
Core.getInstance().getLogger().log(Level.INFO, "Checkpoint restored");
|
Core.getInstance().getLogger().log(Level.INFO, "Checkpoint restored");
|
||||||
|
|
||||||
for (ServerPlayer player : MinecraftServer.getServer().getPlayerList().players) {
|
|
||||||
System.out.println(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user