From 4fa9961c159ccca4e428f8a34490a7e347258980 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 16 Dec 2016 10:43:29 +1100 Subject: [PATCH] #1958: Negative compression thresholds disable compression like Vanilla --- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index b1874ab8..24721501 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -614,7 +614,7 @@ public final class UserConnection implements ProxiedPlayer public void setCompressionThreshold(int compressionThreshold) { - if ( ch.getHandle().isActive() && this.compressionThreshold == -1 ) + if ( ch.getHandle().isActive() && this.compressionThreshold == -1 && compressionThreshold >= 0 ) { this.compressionThreshold = compressionThreshold; unsafe.sendPacket( new SetCompression( compressionThreshold ) );