aboutsummaryrefslogtreecommitdiff
path: root/src/recv.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-22 13:06:10 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-22 13:06:10 +0200
commit5da59ebec5f3072d0b6c3b1ffc90eb8923c50ad9 (patch)
treecd5c08198db5a0b8499dfb80222d82e8d0518ab2 /src/recv.rs
parent9cb28c21b4a80aa9f29097f6bb1b8b6c23446ddc (diff)
downloadnetapp-5da59ebec5f3072d0b6c3b1ffc90eb8923c50ad9.tar.gz
netapp-5da59ebec5f3072d0b6c3b1ffc90eb8923c50ad9.zip
Move things around and fix error bit
Diffstat (limited to 'src/recv.rs')
-rw-r--r--src/recv.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/recv.rs b/src/recv.rs
index b2f5530..2be8728 100644
--- a/src/recv.rs
+++ b/src/recv.rs
@@ -75,7 +75,7 @@ pub(crate) trait RecvLoop: Sync + 'static {
let has_cont = (size & CHUNK_HAS_CONTINUATION) != 0;
let is_error = (size & ERROR_MARKER) != 0;
let packet = if is_error {
- Err(size as u8)
+ Err((size & !ERROR_MARKER) as u8)
} else {
let size = size & !CHUNK_HAS_CONTINUATION;
let mut next_slice = vec![0; size as usize];