diff --git a/configfileparser.cpp b/configfileparser.cpp index 39bc47c..dbb9c7d 100644 --- a/configfileparser.cpp +++ b/configfileparser.cpp @@ -289,12 +289,6 @@ void ConfigFileParser::loadFile(bool test) } } - if (tmpSettings->listeners.empty()) - { - std::shared_ptr defaultListener(new Listener()); - tmpSettings->listeners.push_back(defaultListener); - } - tmpSettings->authOptCompatWrap = AuthOptCompatWrap(authOpts); if (!test) diff --git a/mainapp.cpp b/mainapp.cpp index 5161096..31de8ee 100644 --- a/mainapp.cpp +++ b/mainapp.cpp @@ -476,6 +476,13 @@ void MainApp::loadConfig() confFileParser->loadFile(false); settings = std::move(confFileParser->settings); + if (settings->listeners.empty()) + { + std::shared_ptr defaultListener(new Listener()); + defaultListener->isValid(); + settings->listeners.push_back(defaultListener); + } + // For now, it's too much work to be able to reload new listeners, with all the shared resource stuff going on. So, I'm // loading them to a local var which is never updated. if (listeners.empty())