Skip to content

Fix: MQTTv5 keep-alive duration <= 5 sec allowed #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jathn
Copy link

@Jathn Jathn commented Jul 9, 2025

This pull request removes the minimum requirement of 5 seconds of keep-alive for MQTTv5.
Additionally, the case where the keep-alive is 0 is implemented for MQTTv5 as described in the standard.

The duration is now set with u16 instead of Duration as discussed in #964.

It is similar to pull request #655 which changed the minimum requirement and 0-case handling.

Issue: #964
Attribute: This PR adds support for this in MQTTv5, following the approach used in @danieldougherty 's implementation for MQTTv4 in PR #655.

Type of change

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Formatted with cargo fmt
  • Make an entry to CHANGELOG.md if it's relevant to the users of the library. If it's not relevant mention why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant