Skip to content

Commit

Permalink
Log from all buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
anhcuky committed Jan 21, 2023
1 parent 1550899 commit cc51435
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/connect.rs
Expand Up @@ -907,10 +907,11 @@ mod verbose {
) -> Poll<Result<usize, io::Error>> {
match Pin::new(&mut self.inner).poll_write_vectored(cx, bufs) {
Poll::Ready(Ok(n)) => {
let buf = bufs
let buf: Vec<u8> = bufs
.iter()
.find(|b| !b.is_empty())
.map_or(&[][..], |b| &**b);
.flat_map(|b| &**b)
.map(|b| *b)
.collect();
log::trace!("{:08x} write: {:?}", self.id, Escape(&buf[..n]));
Poll::Ready(Ok(n))
}
Expand Down

0 comments on commit cc51435

Please sign in to comment.