Skip to content

Commit

Permalink
fix(qrecovery): fix SizeKnown::is_all_rcvd
Browse files Browse the repository at this point in the history
  • Loading branch information
eareimu authored and huster-zhangpeng committed Jan 22, 2025
1 parent e549ae0 commit 5036828
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qrecovery/src/recv/recver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ where
cx: &mut Context<'_>,
buf: &mut impl BufMut,
) -> Poll<io::Result<()>> {
log::info!("Recv::poll_read");
if self.rcvbuf.is_readable() {
self.rcvbuf.try_read(buf);

Expand Down Expand Up @@ -223,7 +224,7 @@ impl<TX> SizeKnown<TX> {
}

pub(super) fn is_all_rcvd(&self) -> bool {
self.rcvbuf.available() == self.final_size
self.rcvbuf.nread() + self.rcvbuf.available() == self.final_size
}

#[allow(dead_code)]
Expand Down

0 comments on commit 5036828

Please sign in to comment.