[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/DocumentBroker.cpp
Jan Holesovsky
kendy at collabora.com
Tue Apr 18 12:39:09 UTC 2017
wsd/DocumentBroker.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 9674ed89a4a0935b985a5d318fb49621e801b98c
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Apr 18 12:13:04 2017 +0200
Safer place for the tile cache cleanup.
When calling the cleanup from DocumentBroker::destroyIfLastEditor(), it might
be (theoretically) too early; so let's do it safer - as the last thing when
shutting down the DocumentBroker::pollThread().
Change-Id: Idc5e34b36d524c8f87a3a0fc99c87244e9784abf
Reviewed-on: https://gerrit.libreoffice.org/36638
Reviewed-by: Michael Meeks <michael at gnome.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index e0c8b05b..8ad9571e 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -287,6 +287,10 @@ void DocumentBroker::pollThread()
// Async cleanup.
LOOLWSD::doHousekeeping();
+ // Remove all tiles related to this document from the cache if configured so.
+ if (_tileCache && !LOOLWSD::TileCachePersistent)
+ _tileCache->completeCleanup();
+
LOG_INF("Finished docBroker polling thread for docKey [" << _docKey << "].");
}
@@ -1198,10 +1202,6 @@ void DocumentBroker::destroyIfLastEditor(const std::string& id)
_markToDestroy = (_sessions.size() <= 1);
LOG_DBG("startDestroy on session [" << id << "] on docKey [" << _docKey <<
"], markToDestroy: " << _markToDestroy << ", lastEditableSession: " << _lastEditableSession);
-
- // Remove all tiles related to this document from the cache.
- if (_markToDestroy && !LOOLWSD::TileCachePersistent)
- _tileCache->completeCleanup();
}
void DocumentBroker::setModified(const bool value)
More information about the Libreoffice-commits
mailing list