Browse Source

ignoring the reported port for the moment

develop
Drew Short 6 years ago
parent
commit
0d2599fac7
  1. 2
      src/server/api.rs

2
src/server/api.rs

@ -31,7 +31,7 @@ fn parse_remote_info(remote_info: &str) -> Result<IpAddr, APIError> {
let mut remote_address = String::from(remote_info);
if remote_address.contains(":") {
let last_colon_index = remote_address.rfind(":").unwrap();
let port = remote_address.split_off(last_colon_index);
let _port = remote_address.split_off(last_colon_index);
if remote_address.starts_with("[") && remote_address.ends_with("]") {
remote_address = String::from(remote_address.trim_matches(|c| c == '[' || c == ']'))
}

Loading…
Cancel
Save