don't worry about it ...
This commit is contained in:
parent
6ace49cc88
commit
a569737ba2
|
@ -20,11 +20,7 @@ impl Peer {
|
|||
pub async fn send(&mut self, msg: Msg) -> Result<(), tokio::io::Error> {
|
||||
let targ = self.targ.expect("no target to send to");
|
||||
let bs = msg.ser();
|
||||
let mut i = 0;
|
||||
while i < bs.len() {
|
||||
let n = self.sock.send_to(&bs[i..], targ).await?;
|
||||
i += n
|
||||
}
|
||||
let _n_sent = self.sock.send_to(&bs, targ).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue