Skip to content

Commit

Permalink
Allow keepalive to be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
rmqtt committed Aug 21, 2023
1 parent 89a5fe7 commit 54dfca3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/v5/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ impl<Io, St> HandshakeAck<Io, St> {
///
/// By default idle keep-alive is set to 30 seconds. Panics if timeout is `0`.
pub fn keep_alive(mut self, timeout: u16) -> Self {
if timeout == 0 {
panic!("Timeout must be greater than 0")
}
//if timeout == 0 {
// panic!("Timeout must be greater than 0")
//}
self.keepalive = timeout;
self
}
Expand Down

0 comments on commit 54dfca3

Please sign in to comment.