loolwsd: avoid NotFoundException when per_document.max_concurrency is missing (old config)

This commit is contained in:
Andras Timar 2016-06-21 16:15:31 +02:00
parent b460769eed
commit bc4633a2a1

View file

@ -1275,7 +1275,7 @@ void LOOLWSD::initialize(Application& self)
NumPreSpawnedChildren = config().getUInt("num_prespawn_children", 1);
}
const auto maxConcurrency = config().getInt("per_document.max_concurrency");
const auto maxConcurrency = config().getInt("per_document.max_concurrency", 4);
if (maxConcurrency > 0)
{
setenv("MAX_CONCURRENCY", std::to_string(maxConcurrency).c_str(), 1);