Removed duplicate error prints

This commit is contained in:
Dennis Schwerdel 2016-08-08 22:24:04 +02:00
parent b8fcd382d8
commit de6709853f
1 changed files with 2 additions and 8 deletions

View File

@ -236,10 +236,7 @@ impl<P: Protocol> GenericCloud<P> {
try!(match socket.send_to(msg_data, addr) { try!(match socket.send_to(msg_data, addr) {
Ok(written) if written == msg_data.len() => Ok(()), Ok(written) if written == msg_data.len() => Ok(()),
Ok(_) => Err(Error::Socket("Sent out truncated packet", io::Error::new(io::ErrorKind::Other, "truncated"))), Ok(_) => Err(Error::Socket("Sent out truncated packet", io::Error::new(io::ErrorKind::Other, "truncated"))),
Err(e) => { Err(e) => Err(Error::Socket("IOError when sending", e))
error!("Failed to send via network {}", e);
Err(Error::Socket("IOError when sending", e))
}
}) })
} }
Ok(()) Ok(())
@ -262,10 +259,7 @@ impl<P: Protocol> GenericCloud<P> {
match socket.send_to(msg_data, addr) { match socket.send_to(msg_data, addr) {
Ok(written) if written == msg_data.len() => Ok(()), Ok(written) if written == msg_data.len() => Ok(()),
Ok(_) => Err(Error::Socket("Sent out truncated packet", io::Error::new(io::ErrorKind::Other, "truncated"))), Ok(_) => Err(Error::Socket("Sent out truncated packet", io::Error::new(io::ErrorKind::Other, "truncated"))),
Err(e) => { Err(e) => Err(Error::Socket("IOError when sending", e))
error!("Failed to send via network {}", e);
Err(Error::Socket("IOError when sending", e))
}
} }
} }