mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-02-26 08:31:24 +01:00
Fix Disconnect Issue (It's not really harmful but still)
This commit is contained in:
parent
a40182186f
commit
8760b53a0a
@ -34,9 +34,13 @@ public class ViaIdleThread extends BukkitRunnable {
|
||||
long nextIdleUpdate = info.get(MovementTracker.class).getNextIdlePacket();
|
||||
if (nextIdleUpdate <= System.currentTimeMillis()) {
|
||||
ChannelHandlerContext context = PipelineUtil.getContextBefore("decoder", info.getChannel().pipeline());
|
||||
context.fireChannelRead(idlePacket);
|
||||
if(info.getChannel().isOpen()) {
|
||||
if (context != null) {
|
||||
context.fireChannelRead(idlePacket);
|
||||
|
||||
info.get(MovementTracker.class).incrementIdlePacket();
|
||||
info.get(MovementTracker.class).incrementIdlePacket();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user