Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Will publishing is not working as expected when Will Delay Interval is longer than Session Expiry Interval #1401
The Will Message is not published when the Will Delay Interval is longer than the Session Expiry Interval.
Steps to Reproduce
The Will Message should be published when the session expires (after 5 seconds).
Relevant sections from the MQTT 5.0 spec:
The Will Message is not published when either the Will Delay Interval has elapsed or the session ends when the Will Delay Interval is longer than the Session Expiry Interval.
I've also sometimes seen the broker exit with a status of
The Will Publish works as expected when the Will Delay Interval is shorter than the Session Expiry Interval.
It would be a little difficult for me to share that test suite since the project is still WIP (although I'm open to it if needed, since it's reproducing the bug consistently), but I was able to quickly put together a simple node.js script that often reproduces the same issue.
I've attached the an archive of the node.js app that can reproduce the race / crash.
Let me know what you think / if it makes sense and I'm happy to provide more info to help close this out.