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:
parent
f9d54cd058
commit
79c1791764
1 changed files with 5 additions and 2 deletions
|
@ -2518,8 +2518,11 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
|
||||||
cleanupDocBrokers();
|
cleanupDocBrokers();
|
||||||
for (auto& pair : DocBrokers)
|
for (auto& pair : DocBrokers)
|
||||||
{
|
{
|
||||||
auto docLock = pair.second->getLock();
|
auto docLock = pair.second->getDeferredLock();
|
||||||
pair.second->autoSave(false, 0, docLock);
|
if (docLock.try_lock())
|
||||||
|
{
|
||||||
|
pair.second->autoSave(false, 0, docLock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception& exc)
|
catch (const std::exception& exc)
|
||||||
|
|
Loading…
Reference in a new issue