Skip to content

Commit

Permalink
bump network-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Karl committed Sep 15, 2023
1 parent 0fecd62 commit ccff534
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ thiserror = "1"
stun_codec = "0.3.2"
bytecodec = "0.4.15"
trackable = "1.3.0"
network-interface = "=0.1.6"
network-interface = "1"

# shutdown
tokio-graceful-shutdown = "0.13"
Expand Down
10 changes: 5 additions & 5 deletions src/client/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ pub async fn event_loop(
let local_ips = NetworkInterface::show()
.unwrap_or_log()
.into_iter()
.filter(|x| x.addr.is_some())
.map(|x| match x.addr.unwrap() {
network_interface::Addr::V4(x) => IpAddr::from(x.ip).into(),
network_interface::Addr::V6(x) => IpAddr::from(x.ip).into(),
})
.flat_map(|x| x.addr.into_iter().map(|x|
match x {
network_interface::Addr::V4(x) => IpAddr::from(x.ip).into(),
network_interface::Addr::V6(x) => IpAddr::from(x.ip).into(),
}))
.collect();
debug!("local ips: {local_ips:?}");
let address_reply = client
Expand Down

0 comments on commit ccff534

Please sign in to comment.