aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src')
-rwxr-xr-xazalea-protocol/src/connect.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs
index e29ba1df..dbca4214 100755
--- a/azalea-protocol/src/connect.rs
+++ b/azalea-protocol/src/connect.rs
@@ -87,8 +87,8 @@ impl Connection<ClientboundHandshakePacket, ServerboundHandshakePacket> {
impl Connection<ClientboundLoginPacket, ServerboundLoginPacket> {
pub fn set_compression_threshold(&mut self, threshold: i32) {
- // if you pass a threshold of 0 or less, compression is disabled
- if threshold > 0 {
+ // if you pass a threshold of less than 0, compression is disabled
+ if threshold >= 0 {
self.compression_threshold = Some(threshold as u32);
} else {
self.compression_threshold = None;