wsd: assert that we don't have more than one active session

Change-Id: I0c404b19187658d28f6371a1e58430d3a93d6cbc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2022-03-01 21:38:49 -05:00 committed by Ashod Nakashian
parent 832e308e8f
commit b6920d30af

View file

@ -2245,7 +2245,7 @@ void DocumentBroker::disconnectSessionInternal(const std::string& id)
if (_docState.isUnloadRequested())
{
// We must be the last session, flag to destroy if unload is requested.
assert(_sessions.size() == 1 && "Unload-requested with multiple sessions.");
assert(countActiveSessions() <= 1 && "Unload-requested with multiple sessions.");
_docState.markToDestroy();
LOG_TRC("Unload requested while disconnecting session ["
<< id << "], having " << _sessions.size()