Skip to content

Conversation

@alessandroAmedei
Copy link

@alessandroAmedei alessandroAmedei commented Jun 6, 2024

Please make sure that the following boxes are checked before submitting your Pull Request, thank you!

  • This change is against the develop branch, not master.
  • You have signed the Eclipse ECA
  • All of your commits have been signed-off with the correct email address (the same one that you
    used to sign the CLA) Hint: use the -s argument when committing.
  • If This PR fixes an issue, that you reference the issue below. OR if this is a new issue that
    you are fixing straight away that you add some Description about the bug and how this will fix it.
  • If this is new functionality, You have added the appropriate Unit tests.

fix #909 #873 #1005

Fixing the java docs of the method
org.eclipse.paho.mqttv5.client.setSessionExpiryInterval(long)

Without calling this method with parameters greater than 0 or different from null,
once the Network Connetion is closed, the broker will end immediatly the session even if the client
is using cleanSession = false.

@alessandroAmedei
Copy link
Author

To make sure that session is never deleted by broker:

connOpts.setSessionExpiryInterval((long) Integer.MAX_VALUE);

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