Skip to content

Commit

Permalink
change(wireguard): timer interval
Browse files Browse the repository at this point in the history
  • Loading branch information
XOR-op committed Sep 18, 2024
1 parent 2f6d0ac commit 16e1c7c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions boltconn/src/adapter/wireguard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,14 @@ impl Endpoint {
tracing::warn!("[WireGuard] Close connection #{} for {}", name, e);
return;
}
tokio::time::sleep(Duration::from_millis(300)).await;
tokio::time::sleep(Duration::from_millis(30)).await;
}
Ok(has_sent) => {
if has_sent {
continuous_err_cnt = 0;
}
// <del>From boringtun, the recommended interval is 100ms.</del>
// Comments from Tunn::update_timers says one second interval is enough.
tokio::time::sleep(Duration::from_millis(1000)).await;
// From boringtun, the recommended interval is 100ms.
tokio::time::sleep(Duration::from_millis(100)).await;
}
}
}
Expand Down

0 comments on commit 16e1c7c

Please sign in to comment.