Loading crates/onion-tunnel/src/socket.rs +4 −4 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ impl AsyncRead for TcpSocket { ) -> Poll<std::io::Result<()>> { self.with(|s| match s.can_recv() { true => { let rbuf = s.recv(|b| (buf.remaining(), b)); let rbuf = s.recv_slice(buf.initialize_unfilled()); match rbuf { Err(e) => { return Poll::Ready(Err(std::io::Error::new( Loading @@ -128,9 +128,9 @@ impl AsyncRead for TcpSocket { format!("{}", e), ))) } Ok(b) => { if b.len() > 0 { buf.put_slice(b); Ok(n) => { if n > 0 { buf.set_filled(n); Poll::Ready(Ok(())) } else { s.register_recv_waker(cx.waker()); Loading Loading
crates/onion-tunnel/src/socket.rs +4 −4 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ impl AsyncRead for TcpSocket { ) -> Poll<std::io::Result<()>> { self.with(|s| match s.can_recv() { true => { let rbuf = s.recv(|b| (buf.remaining(), b)); let rbuf = s.recv_slice(buf.initialize_unfilled()); match rbuf { Err(e) => { return Poll::Ready(Err(std::io::Error::new( Loading @@ -128,9 +128,9 @@ impl AsyncRead for TcpSocket { format!("{}", e), ))) } Ok(b) => { if b.len() > 0 { buf.put_slice(b); Ok(n) => { if n > 0 { buf.set_filled(n); Poll::Ready(Ok(())) } else { s.register_recv_waker(cx.waker()); Loading