Skip to content
New issue

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

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

Already on GitHub? # to your account

JavaDoc about sessionExpiryInterval in MQTT 5 client is incorrect #873

Open
2 of 3 tasks
jbertram opened this issue Apr 21, 2021 · 0 comments
Open
2 of 3 tasks

JavaDoc about sessionExpiryInterval in MQTT 5 client is incorrect #873

jbertram opened this issue Apr 21, 2021 · 0 comments

Comments

@jbertram
Copy link

jbertram commented Apr 21, 2021

  • Bug exists Release Version 1.2.5 ( Master Branch)
  • Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
  • Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)

The JavaDoc on org.eclipse.paho.mqttv5.client.MqttConnectionOptions#setSessionExpiryInterval states (in part):

By default this value is null and so will not be sent, in this case, the session will not expire.

However section 3.1.2.11.2 of the MQTT 5 specification states:

If the Session Expiry Interval is absent the value 0 is used. If it is set to 0, or is absent, the Session ends when the Network Connection is closed.

If the Session Expiry Interval is 0xFFFFFFFF (UINT_MAX), the Session does not expire.

The JavaDoc on org.eclipse.paho.mqttv5.client.MqttConnectionOptions#setSessionExpiryInterval should be corrected to reflect the behavior defined in the specification. It would also probably be useful to make org.eclipse.paho.mqttv5.common.packet.MqttDataTypes#FOUR_BYTE_INT_MAX public and reference that in the JavaDoc as an easy way to ensure the session does not expire.

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

No branches or pull requests

1 participant