Skip to content

Commit

Permalink
Correctly return the result
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Jan 5, 2024
1 parent 96a5656 commit 84356a4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions io/zenoh-links/zenoh-link-tcp/src/unicast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ impl LinkUnicastTrait for LinkUnicastTcp {
}

async fn read_exact(&self, buffer: &mut [u8]) -> ZResult<()> {
let _ = self.get_mut_socket().read_exact(buffer).await.map_err(|e| {
let e = zerror!("Read error on TCP link {}: {}", self, e);
log::trace!("{}", e);
e
});
let _ = self
.get_mut_socket()
.read_exact(buffer)
.await
.map_err(|e| {
let e = zerror!("Read error on TCP link {}: {}", self, e);
log::trace!("{}", e);
e
})?;
Ok(())
}

Expand Down

0 comments on commit 84356a4

Please sign in to comment.