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,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());
|
||||
|
|
Loading…
Reference in a new issue