Fixed bugs

This commit is contained in:
Igor Katson 2023-11-18 00:20:49 +00:00
parent 6ebf2120a4
commit 2203ffe4a9
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
7 changed files with 536 additions and 44 deletions

View file

@ -31,6 +31,7 @@ pub trait PeerConnectionHandler {
pub enum WriterRequest {
Message(MessageOwned),
ReadChunkRequest(ChunkInfo),
Disconnect,
}
#[derive(Default, Copy, Clone)]
@ -247,6 +248,9 @@ impl<H: PeerConnectionHandler> PeerConnection<H> {
uploaded_add = Some(chunk.size);
full_len
}
WriterRequest::Disconnect => {
return Ok(());
}
};
debug!("sending to {}: {:?}, length={}", self.addr, &req, len);