From ec62a16ca8fa1cdb66651fae99ad932833dcee3e Mon Sep 17 00:00:00 2001 From: MeexReay Date: Tue, 16 Jul 2024 02:49:18 +0300 Subject: [PATCH] hot bug fix with compression IM DUMB --- src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index feec248..100eb7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -689,10 +689,13 @@ impl MinecraftConnection { /// Set compression threshold pub fn set_compression(&mut self, threshold: Option) { - self.compression = Arc::new(AtomicUsize::new(match threshold { - Some(t) => t, - None => usize::MAX, - })); + self.compression.store( + match threshold { + Some(t) => t, + None => usize::MAX, + }, + Ordering::Relaxed, + ); } /// Get compression threshold