Fix task cancellation

This commit is contained in:
Andrew Steinborn
2018-07-26 16:08:51 -04:00
parent 80477f6a0e
commit 60ac285b17

View File

@@ -22,7 +22,7 @@ public class PlaySessionHandler implements MinecraftSessionHandler {
@Override @Override
public void activated() { public void activated() {
EventLoop loop = player.getConnection().getChannel().eventLoop(); EventLoop loop = player.getConnection().getChannel().eventLoop();
loop.scheduleAtFixedRate(this::ping, 5, 15, TimeUnit.SECONDS); pingTask = loop.scheduleAtFixedRate(this::ping, 5, 15, TimeUnit.SECONDS);
} }
private void ping() { private void ping() {