3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 17:20:24 +01:00

Fix Disconnect Issue (It's not really harmful but still)

Dieser Commit ist enthalten in:
Myles 2016-03-30 17:45:24 +01:00
Ursprung a40182186f
Commit 8760b53a0a

Datei anzeigen

@ -34,6 +34,8 @@ public class ViaIdleThread extends BukkitRunnable {
long nextIdleUpdate = info.get(MovementTracker.class).getNextIdlePacket(); long nextIdleUpdate = info.get(MovementTracker.class).getNextIdlePacket();
if (nextIdleUpdate <= System.currentTimeMillis()) { if (nextIdleUpdate <= System.currentTimeMillis()) {
ChannelHandlerContext context = PipelineUtil.getContextBefore("decoder", info.getChannel().pipeline()); ChannelHandlerContext context = PipelineUtil.getContextBefore("decoder", info.getChannel().pipeline());
if(info.getChannel().isOpen()) {
if (context != null) {
context.fireChannelRead(idlePacket); context.fireChannelRead(idlePacket);
info.get(MovementTracker.class).incrementIdlePacket(); info.get(MovementTracker.class).incrementIdlePacket();
@ -42,3 +44,5 @@ public class ViaIdleThread extends BukkitRunnable {
} }
} }
} }
}
}