Handle duplicates from server pings gracefully

This commit is contained in:
Andrew Steinborn
2020-06-23 23:03:19 -04:00
parent fd231c71fd
commit 780e1c8be5
2 changed files with 4 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ import com.velocitypowered.natives.encryption.VelocityCipherFactory;
import com.velocitypowered.natives.util.Natives;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.connection.client.InitialInboundConnection;
import com.velocitypowered.proxy.connection.client.StatusSessionHandler;
import com.velocitypowered.proxy.protocol.MinecraftPacket;
import com.velocitypowered.proxy.protocol.StateRegistry;
import com.velocitypowered.proxy.protocol.netty.MinecraftCipherDecoder;
@@ -92,7 +93,8 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
sessionHandler.disconnected();
}
if (association != null && !knownDisconnect) {
if (association != null && !knownDisconnect
&& !(sessionHandler instanceof StatusSessionHandler)) {
logger.info("{} has disconnected", association);
}
}