Skip to content

Commit 5b311b5

Browse files
authored
Correct the length of data that has been sent
1 parent a6f55c1 commit 5b311b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,8 @@ where
695695
{
696696
let addr: AddrKind = addr.into();
697697
let bytes = Self::write_request(buf, addr).await?;
698-
Ok(self.socket.send(&bytes).await?)
698+
let header_len = bytes.len() - buf.len();
699+
Ok(self.socket.send(&bytes).await? - header_len)
699700
}
700701

701702
async fn read_response(

0 commit comments

Comments
 (0)