From 60ac285b17bab5eaac2cbb2f9a7ca4000466294a Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 26 Jul 2018 16:08:51 -0400 Subject: [PATCH] Fix task cancellation --- .../proxy/connection/client/PlaySessionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/velocitypowered/proxy/connection/client/PlaySessionHandler.java b/src/main/java/com/velocitypowered/proxy/connection/client/PlaySessionHandler.java index 357921da6..d69727b44 100644 --- a/src/main/java/com/velocitypowered/proxy/connection/client/PlaySessionHandler.java +++ b/src/main/java/com/velocitypowered/proxy/connection/client/PlaySessionHandler.java @@ -22,7 +22,7 @@ public class PlaySessionHandler implements MinecraftSessionHandler { @Override public void activated() { 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() {