hot bug fix with compression IM DUMB
This commit is contained in:
parent
25dfebc6ec
commit
ec62a16ca8
11
src/lib.rs
11
src/lib.rs
@ -689,10 +689,13 @@ impl<T: Read + Write> MinecraftConnection<T> {
|
|||||||
|
|
||||||
/// Set compression threshold
|
/// Set compression threshold
|
||||||
pub fn set_compression(&mut self, threshold: Option<usize>) {
|
pub fn set_compression(&mut self, threshold: Option<usize>) {
|
||||||
self.compression = Arc::new(AtomicUsize::new(match threshold {
|
self.compression.store(
|
||||||
Some(t) => t,
|
match threshold {
|
||||||
None => usize::MAX,
|
Some(t) => t,
|
||||||
}));
|
None => usize::MAX,
|
||||||
|
},
|
||||||
|
Ordering::Relaxed,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get compression threshold
|
/// Get compression threshold
|
||||||
|
Loading…
Reference in New Issue
Block a user