-
This includes some logic to have threads finish their work before quitting.
-
One fix is client destruction happening on the correct thread (when kicking another one off with existing client ID). This caused deadlocks on the subscriptions lock during a race condition when doKeepAliveCheck() also ran. A related deadlock was that the queued functions were executed while holding the lock taskQueueMutex. Together with the subscriptions lock, that was executed in the $SYS topic function, this also caused deadlocks.
-
This avoids changing which thread runs the code. Also let auth_plugin_serialize_init affect cleanup serialization.
-
It was a mistake that it ran inside the timer thread, which came to light by asserting the thread local authentication pointer (see a few commits ago).
-
Also include a few stats.
-
Instead of getting it from the sender of a packet. Sometimes there was no sender. This fixes a crash on retained messages, because those newly created packets didn't have a sender to get the threaddata from. So, using a special object for it is easier and more robust.
-
Encrypted version only.
-
My IDE didn't understand them for finding symbols, apparently.
-
This fixes the 100ms wait time requirement.
-
This allows creation of multiple listeners, with different protocols and/or SSL certificates. Related change: settings is now a class that is copyable and assignable, and is done so to each thread on reload. Semi-related fix: fix crash in quit when multiple threads initiated it. This came to light when testing the auth plugin settings.
-
It's also used to reload settings. Settings are copied to threads, to avoid concurrency issues.
-
It can be defined in the config file, along with options.
-
We use epoll now to change readiness.
-
I put the main app in a seperate class for it, because it was easier.
-
Roughly...
-
And I had to fix a threading bug.