mirror of
https://git.alemi.dev/mumble-stats-api.git
synced 2024-11-14 04:29:19 +01:00
fix: drop before decoding for less contention
This commit is contained in:
parent
40a95b4d0a
commit
ed0be85550
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ impl ControlChannel {
|
||||||
let size = rx.read_u32().await?;
|
let size = rx.read_u32().await?;
|
||||||
let mut buffer = vec![0u8; size as usize];
|
let mut buffer = vec![0u8; size as usize];
|
||||||
rx.read_exact(&mut buffer).await?;
|
rx.read_exact(&mut buffer).await?;
|
||||||
|
drop(rx);
|
||||||
super::proto::Packet::decode(id, &buffer)
|
super::proto::Packet::decode(id, &buffer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue