From 920b14661900672013b6ab134bc4e6d2c7d225f1 Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Sat, 12 Feb 2022 18:02:38 +0100 Subject: [PATCH] Fix fuzz mode --- mainapp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mainapp.cpp b/mainapp.cpp index 40625be..938abe4 100644 --- a/mainapp.cpp +++ b/mainapp.cpp @@ -30,6 +30,8 @@ License along with FlashMQ. If not, see . #include "logger.h" #include "threadglobals.h" #include "threadloop.h" +#include "authplugin.h" +#include "threadglobals.h" MainApp *MainApp::instance = nullptr; @@ -432,6 +434,9 @@ void MainApp::start() std::vector packetQueueIn; std::vector subtopics; + Authentication auth(settingsLocalCopy); + ThreadGlobals::assign(&auth); + std::shared_ptr threaddata(new ThreadData(0, subscriptionStore, settings)); std::shared_ptr client(new Client(fd, threaddata, nullptr, fuzzWebsockets, nullptr, settings, true)); @@ -484,7 +489,8 @@ void MainApp::start() } // Populate the $SYS topics, otherwise you have to wait until the timer expires. - threads.front()->queuePublishStatsOnDollarTopic(threads); + if (!threads.empty()) + threads.front()->queuePublishStatsOnDollarTopic(threads); uint next_thread_index = 0; -- libgit2 0.21.4