Skip to content

Commit

Permalink
Correctly parse ip echo server response and fix broken test (solana-l…
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines authored Dec 3, 2019
1 parent 076e384 commit c6695a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions net-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn ip_echo_server_request(
));
}

bincode::deserialize(&data[3..]).map_err(|err| {
bincode::deserialize(&data[4..]).map_err(|err| {
io::Error::new(
io::ErrorKind::Other,
format!("Failed to deserialize: {:?}", err),
Expand Down Expand Up @@ -481,7 +481,10 @@ mod tests {
let _runtime = ip_echo_server(server_tcp_listener);

let ip_echo_server_addr = server_udp_socket.local_addr().unwrap();
get_public_ip_addr(&ip_echo_server_addr).unwrap();
assert_eq!(
get_public_ip_addr(&ip_echo_server_addr),
parse_host("127.0.0.1"),
);

verify_reachable_ports(
&ip_echo_server_addr,
Expand Down

0 comments on commit c6695a3

Please sign in to comment.