Fix docstring and README example for ping timeout default

This commit is contained in:
Frederik B 2021-04-11 21:03:07 +02:00
parent ceb2ea27d1
commit 8605fcb421
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" version = "irc:git:Rust"
source = "https://github.com/aatxe/irc" source = "https://github.com/aatxe/irc"
ping_time = 180 ping_time = 180
ping_timeout = 10 ping_timeout = 20
burst_window_length = 8 burst_window_length = 8
max_messages_in_burst = 15 max_messages_in_burst = 15
should_ghost = false 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 /// Gets the amount of time in seconds for the client to disconnect after not receiving a ping
/// response. /// response.
/// This defaults to 10 seconds when not specified. /// This defaults to 20 seconds when not specified.
pub fn ping_timeout(&self) -> u32 { pub fn ping_timeout(&self) -> u32 {
self.ping_timeout.as_ref().cloned().unwrap_or(20) self.ping_timeout.as_ref().cloned().unwrap_or(20)
} }