wsd/DocumentBroker.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit d843dbcd3b612c44a9e917e792927c6781eaac2d Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Thu Mar 21 14:25:15 2019 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Mar 21 14:32:33 2019 +0200 tdf#124055: Idle timeout is pointless in mobile apps We don't want to unload the document and show any "Idle document - please click to reload and resume editing" overlay. What the iOS (and presumably Android) app *would* need, though, is proper restore functionality. I.e. if you have a document open, and the app is put in the background (i.e. the user does something else), and the OS kills it (as is perfectly normal for iOS or Android to do to idle background apps), then when the user returs to the app, it should reopen the same document and restore the view location and zoom level. diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index d9b205801..31d952101 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -257,10 +257,11 @@ void DocumentBroker::pollThread() LOG_INF("Doc [" << _docKey << "] attached to child [" << _childProcess->getPid() << "]."); static const bool AutoSaveEnabled = !std::getenv("LOOL_NO_AUTOSAVE"); + +#ifndef MOBILEAPP static const size_t IdleDocTimeoutSecs = LOOLWSD::getConfigValue<int>( "per_document.idle_timeout_secs", 3600); -#ifndef MOBILEAPP // Used to accumulate B/W deltas. uint64_t adminSent = 0; uint64_t adminRecv = 0; @@ -331,9 +332,11 @@ void DocumentBroker::pollThread() last30SecCheckTime = std::chrono::steady_clock::now(); } + if (false) + ; +#ifndef MOBILEAPP // Remove idle documents after 1 hour. - const bool idle = (isLoaded() && getIdleTimeSecs() >= IdleDocTimeoutSecs); - if (idle) + else if ((isLoaded() && getIdleTimeSecs() >= IdleDocTimeoutSecs)) { // Stop if there is nothing to save. LOG_INF("Autosaving idle DocumentBroker for docKey [" << getDocKey() << "] to kill."); @@ -343,6 +346,7 @@ void DocumentBroker::pollThread() stop("idle"); } } +#endif else if (_sessions.empty() && (isLoaded() || _markToDestroy)) { // If all sessions have been removed, no reason to linger. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits