wsd: don't block on autosave

Change-Id: Id87465f0aeea9d4f29caea9c88d3a8c7837d8ec2
Reviewed-on: https://gerrit.libreoffice.org/34191
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2017-02-11 11:36:38 -05:00 committed by Ashod Nakashian
parent f9d54cd058
commit 79c1791764

View file

@ -2518,10 +2518,13 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
cleanupDocBrokers();
for (auto& pair : DocBrokers)
{
auto docLock = pair.second->getLock();
auto docLock = pair.second->getDeferredLock();
if (docLock.try_lock())
{
pair.second->autoSave(false, 0, docLock);
}
}
}
catch (const std::exception& exc)
{
LOG_ERR("Exception: " << exc.what());