fix: drop before decoding for less contention

This commit is contained in:
əlemi 2024-05-27 19:02:09 +02:00
parent 40a95b4d0a
commit ed0be85550
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -41,6 +41,7 @@ impl ControlChannel {
let size = rx.read_u32().await?;
let mut buffer = vec![0u8; size as usize];
rx.read_exact(&mut buffer).await?;
drop(rx);
super::proto::Packet::decode(id, &buffer)
}
}