-
Notifications
You must be signed in to change notification settings - Fork 280
Open
Description
When using v5, the keep-alive is restricted to at least 5 seconds, but I don't find any reference to this restriction in https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901045.
Lines 229 to 234 in b1c3a20
pub fn set_keep_alive(&mut self, duration: Duration) -> &mut Self { | |
assert!(duration.as_secs() >= 5, "Keep alives should be >= 5 secs"); | |
self.keep_alive = duration; | |
self | |
} |
A keep alive of 0 is also permitted in v5:
A Keep Alive value of 0 has the effect of turning off the Keep Alive mechanism. If Keep Alive is 0 the Client is not obliged to send MQTT Control Packets on any particular schedule.
Metadata
Metadata
Assignees
Labels
No labels