-
Especially remove the flashmq_auth_plugin_allocate_global_memory(), which was an old idea.
-
This saves some allocations. This also meant having to set the C++ standard to 2014. The getCopy() methods of sessions and mqttpackets can't be changed, because of access errors (private).
-
For the coming MQTT5 support, I'll need this a lot.
-
This is a preparation for MQTT5, because when there are receivers and publishers with different protocols, you can't always just write out the same packet. You can sometimes though, so that's what the copy factory determines.
-
This doesn't actually fix a real bug, just makes assumptions clear.
-
This fixes not handling the last packet(s) of a client that disconnects.
-
This is an (insignificant) amount slower, but otherwise existing sessions won't get the new limits when reloading the config.
-
Because that's what's it is now. A lot of code can be refactored to get the settings from this now, but I'm not going to do that yet.
-
This entails making copies of the original packet when necessary, because QoS 0 doesn't have a packet id. I tried to keep it to an absolute minimum and do some precarious optmizations for it. There are tests though.
-
It caused really funky behavior. When a destructed client closed fd 0, eventfd() would give 0 back as fd. This would then later give errors.
-
This makes more sense, logically, and also helps in tests I'm about to write.
-
There was not really a benefit to the old method, and this prevents packet pile up and keeps the code cleaner.
-
It caused typical global variable issues, showing in the retained messages recursive alghorithm breaking, because the referenced subtopics changed half way (see previous commit of the test for it). I need to perform some benchmarks to see if I need to devise an alternative.
-
Committing separately, because I want to be able to revert the fix I'm about to commit.
-
I don't know what is a good value. I'm upping it, together with (the possibility of increasing) net.core.somaxconn and net.ipv4.tcp_max_syn_backlog. The listen backlog is truncated to somaxconn, to having a high value makes sense. It seems to fix the kernel TCP SYN flooding warnings, if also disabling SYN cookies.
-
Functionally, this doesn't change anything.
-
When clients connect, they get the retained messages. There is no need to do that while holding the subscriptions lock.