-
This should prevent stale data from old clients from manipulating the session.
-
On server shutdown and when taking over a session. On disconnect, wills are queued first, we wait for the queueing to be done, then initiate disconnect. When TCP buffers are full and fds are not reported by epoll, the thread loop still exits and clients are just closed on exit.
-
I didn't count the seconds it was already waiting. It does now.
-
This required a special type WillPublish to make this easier and more logical.
-
It erroneously referred to the system function 'dup' now...
-
Also fix some bugs: - The password can be binary data. - The will topic is now also checked.
-
This is better in line with how the copy factory is meant to be used. It actually broke on the assert on 'externallyReceived' before.
-
This allows easier saving of MQTT5 properties, for which a new file version for retained messages is created. It uses the packet parsing logic.
-
This includes some logic to have threads finish their work before quitting.
-
It went over boundry when there were no properties. Also changed will logic in disconnect: only clear it when it's a successful disconnect.
-
- Delay is properly counted from moment of disconnect. - When a session is picked up again, the will is not sent. - An actual fix to what I tried a few commits ago: fix sending will twice. This logic should make storing wills also easier.
-
I think it's very hard to distinguish between protocol error and malformed packet. It's kind of arbitrary...
-
The loop of pending messages was stuck. We saved a session expiry interval of 0. I may need to change that session copying idea.
-
Also fixes a bug in new interval calculation.
-
And the TODOs are for the next thing: saving the createdAt date.
-
This prevents bugs because the calling context forgets it. A (small) downside is that I have to make the Publish argument non-const. But, that's exactly what it is then, so...
-
Also fixed a length check bug.
-
Because clients can now also exist as dummy objects, I had to add some extra checks. Also split up handlePublish() and the new parsePublishData().
-
I'm not sure how I'm continueing. I need a safe point.
-
But, this is a safe point before I will refactor it. I will remove the appStartTime and session last touched. With the new queued removals, this is no longer necessary.
-
Only mqtt3 though.
-
Not tested yet.
-
I'm simplying/merging the rec, comp and rel packets, but I'm not sure it will work. Committing as a safe point. Later: I got it done as planned. Testing qos > 0 and mqtt5 still needs to be done more.