Skip to content
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

SessionExpiryInterval does not result in sessions being expired #1756

Closed
insylogo opened this issue Jun 7, 2023 · 1 comment · Fixed by #1776
Closed

SessionExpiryInterval does not result in sessions being expired #1756

insylogo opened this issue Jun 7, 2023 · 1 comment · Fixed by #1776
Labels
bug Something isn't working

Comments

@insylogo
Copy link

insylogo commented Jun 7, 2023

Describe the bug

When a client establishes a session using SessionExpiryInterval > 0, and then disconnects, then later reconnects with CleanSession=false, it does not matter if the session expiry interval has lapsed, the client will resume the prior session.

Which component is your bug related to?

  • Server

To Reproduce

Steps to reproduce the behavior:

  1. Using MQTTNet v4.2.1.781
  2. Connect a client with a specific ClientID, setting SessionExpiryInterval to 1.
  3. Subscribe to a topic
  4. Disconnect your client
  5. Send messages to the topic subscribed in 3
  6. Wait as long as you'd like past your SessionExpiryInterval
  7. Re-connect your client with CleanSession=false

Expected behavior

Client connects, is given a new session because the prior session has expired.

Actual behavior

Client connects and resumes prior session, receives all pending messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant