diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2021-12-31 13:36:35 -0500 |
---|---|---|
committer | Jan Holesovsky <holesovsky@gmail.com> | 2022-01-11 09:28:03 +0100 |
commit | 70665b328f9c1f2420c0bacaf3b2722adf6b3f10 (patch) | |
tree | f6cc3c17d523d3704503d2ed39d30eaa10943c8b /wsd/DocumentBroker.cpp | |
parent | wsd: test: fail when modified docs are unsaved (diff) | |
download | online-70665b328f9c1f2420c0bacaf3b2722adf6b3f10.tar.gz online-70665b328f9c1f2420c0bacaf3b2722adf6b3f10.zip |
wsd: do not create client sessions on docs marked to destroy
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 3eb310d7609e98572959fece196d9bc00147c2ff)
Change-Id: Ic1faa042975816bd15ccc4f5667eeccfb0cf73d7
Diffstat (limited to 'wsd/DocumentBroker.cpp')
-rw-r--r-- | wsd/DocumentBroker.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 6685686d07..07836541d9 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -2244,6 +2244,15 @@ std::shared_ptr<ClientSession> DocumentBroker::createNewClientSession( { try { + if (isMarkedToDestroy()) + { + LOG_INF("DocumentBroker [" + << getDocKey() + << "] is marked to destroy and will not create new client sessions."); + + return nullptr; + } + _docState.resetUnloadRequested(); // We can't unload, if it was requested. LOG_TRC("Creating new session. Resetting UnloadRequested flag."); |