Skip to content

Commit

Permalink
fix lockup during holepunch
Browse files Browse the repository at this point in the history
  • Loading branch information
TudbuT committed Aug 13, 2022
1 parent 775aa5a commit 9e8ec4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
[package]
name = "qft"
version = "0.1.4"
version = "0.1.5"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ fn holepunch(args: &Vec<String>) -> UdpSocket {
.connect(SocketAddrV4::from_str(bind_addr.as_str()).unwrap())
.expect("connection failed");
println!("Waiting...");
holepunch.set_read_timeout(Some(Duration::from_secs(1))).unwrap();
holepunch.set_write_timeout(Some(Duration::from_secs(1))).unwrap();
let mut stop = false;
while !stop {
let m = unix_millis();
Expand Down

0 comments on commit 9e8ec4d

Please sign in to comment.