This commit is contained in:
Igor Katson 2023-12-05 23:24:24 +00:00
parent bc243143e5
commit ca8989f8e6
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
6 changed files with 37 additions and 35 deletions

View file

@ -838,7 +838,7 @@ impl<'a> PeerConnectionHandler for &'a PeerHandler {
fn serialize_bitfield_message_to_buf(&self, buf: &mut Vec<u8>) -> anyhow::Result<usize> {
let g = self.state.lock_read("serialize_bitfield_message_to_buf");
let msg = Message::Bitfield(ByteBuf(g.get_chunks()?.get_have_pieces().as_raw_slice()));
let len = msg.serialize(buf, None)?;
let len = msg.serialize(buf, &|| None)?;
trace!("sending: {:?}, length={}", &msg, len);
Ok(len)
}