Merge pull request #231 from freddyb/fix-ping-timeout-docs

Fix docstring and README example for ping timeout default
This commit is contained in:
Aaron Weiss 2021-04-30 21:59:54 -04:00 committed by GitHub
commit 0179b46c5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -120,7 +120,7 @@ user_info = "I'm a test user for the irc crate."
version = "irc:git:Rust"
source = "https://github.com/aatxe/irc"
ping_time = 180
ping_timeout = 10
ping_timeout = 20
burst_window_length = 8
max_messages_in_burst = 15
should_ghost = false

View file

@ -577,7 +577,7 @@ impl Config {
/// Gets the amount of time in seconds for the client to disconnect after not receiving a ping
/// response.
/// This defaults to 10 seconds when not specified.
/// This defaults to 20 seconds when not specified.
pub fn ping_timeout(&self) -> u32 {
self.ping_timeout.as_ref().cloned().unwrap_or(20)
}