Skip to content

Commit

Permalink
Merge pull request #1 from imor/fix_example
Browse files Browse the repository at this point in the history
always use an ipv4 address
  • Loading branch information
thomaseizinger authored Aug 24, 2024
2 parents 99df770 + 9a4ce0a commit a36d645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bin/stun_sans_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn main() -> anyhow::Result<()> {
let socket = UdpSocket::bind("0.0.0.0:0")?;
let server = "stun.cloudflare.com:3478"
.to_socket_addrs()?
.next()
.find(|addr| addr.is_ipv4())
.context("Failed to resolve hostname")?;
let mut binding = StunBinding::new(server);

Expand Down
2 changes: 1 addition & 1 deletion src/bin/stun_sans_io_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> anyhow::Result<()> {
let socket = UdpSocket::bind("0.0.0.0:0").await?;
let server = "stun.cloudflare.com:3478"
.to_socket_addrs()?
.next()
.find(|addr| addr.is_ipv4())
.context("Failed to resolve hostname")?;
let mut binding = StunBinding::new(server);
let mut timer = Timer::default();
Expand Down

0 comments on commit a36d645

Please sign in to comment.