Fix bug for when no multithreaded config is given

This commit is contained in:
Joseph Henry 2024-09-04 11:00:23 -07:00
parent 95983ba168
commit e42848d37d
No known key found for this signature in database
GPG Key ID: C45B33FF5EBC9344

View File

@ -2653,7 +2653,7 @@ public:
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true); _portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
#if defined(__LINUX__) || defined(__FreeBSD__) #if defined(__LINUX__) || defined(__FreeBSD__)
_multicoreEnabled = OSUtils::jsonBool(settings["multicoreEnabled"],false); _multicoreEnabled = OSUtils::jsonBool(settings["multicoreEnabled"],false);
_concurrency = OSUtils::jsonInt(settings["concurrency"],0); _concurrency = OSUtils::jsonInt(settings["concurrency"],1);
_cpuPinningEnabled = OSUtils::jsonBool(settings["cpuPinningEnabled"],false); _cpuPinningEnabled = OSUtils::jsonBool(settings["cpuPinningEnabled"],false);
if (_multicoreEnabled) { if (_multicoreEnabled) {
unsigned int maxConcurrency = std::thread::hardware_concurrency(); unsigned int maxConcurrency = std::thread::hardware_concurrency();