don't worry about it ...

This commit is contained in:
Milo Turner 2020-03-09 11:12:04 -04:00
parent 6ace49cc88
commit a569737ba2
1 changed files with 1 additions and 5 deletions

View File

@ -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(())
}