Skip to content

Commit

Permalink
Increase default vote duration to 2 minutes (#270)
Browse files Browse the repository at this point in the history
* Increase default vote duration to 2 minutes

* Update comment
  • Loading branch information
AgeManning authored Oct 28, 2024
1 parent ab4ce9a commit a196ef7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Config {
pub request_timeout: Duration,

/// The interval over which votes are remembered when determining our external IP. A lower
/// interval will respond faster to IP changes. Default is 30 seconds.
/// interval will respond faster to IP changes. Default is 2 minutes.
pub vote_duration: Duration,

/// The timeout after which a `QueryPeer` in an ongoing query is marked unresponsive.
Expand Down Expand Up @@ -121,7 +121,7 @@ impl ConfigBuilder {
let config = Config {
enable_packet_filter: false,
request_timeout: Duration::from_secs(1),
vote_duration: Duration::from_secs(30),
vote_duration: Duration::from_secs(120),
query_peer_timeout: Duration::from_secs(2),
query_timeout: Duration::from_secs(60),
request_retries: 1,
Expand Down Expand Up @@ -161,7 +161,7 @@ impl ConfigBuilder {
}

/// The interval over which votes are remembered when determining our external IP. A lower
/// interval will respond faster to IP changes. Default is 30 seconds.
/// interval will respond faster to IP changes. Default is 2 minutes.
pub fn vote_duration(&mut self, vote_duration: Duration) -> &mut Self {
self.config.vote_duration = vote_duration;
self
Expand Down

0 comments on commit a196ef7

Please sign in to comment.