Fix excessive logging when a session hard quits very early on.

Enable Caolan's unit test, pass the proper 'disconnect' message
to the Kit so it can close the underlying window / resource for
the view.

Potentially this also removes 'phantom' users in the user-list
which might be another symptom of this issue.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ib0d0c5cefa7033fff5827d0a825a932cc12f8323
This commit is contained in:
Michael Meeks 2024-05-17 15:39:55 +01:00 committed by Caolán McNamara
parent e14b84c542
commit aefd4606f5
3 changed files with 2 additions and 16 deletions

View file

@ -1987,7 +1987,7 @@ bool Document::forwardToChild(const std::string& prefix, const std::vector<char>
if(session->getViewId() == _editorId) {
_editorId = -1;
}
LOG_DBG("Removing ChildSession [" << sessionId << "].");
LOG_INF("Removing ChildSession [" << sessionId << "].");
// Tell them we're going quietly.
session->sendTextFrame("disconnected:");

View file

@ -169,18 +169,6 @@ public:
}
};
#if 1
UnitBase** unit_create_wsd_multi(void)
{
return new UnitBase* [2]
{
new SecondJoinQuitNormal(), nullptr
};
}
#else
/* In this case, we are currently failing.
We have one user connected, the 2nd user join, and immediately drop
@ -212,6 +200,4 @@ UnitBase** unit_create_wsd_multi(void)
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -170,7 +170,7 @@ bool ClientSession::disconnectFromKit()
{
assert(_state != SessionState::WAIT_DISCONNECT);
auto docBroker = getDocumentBroker();
if (_state == SessionState::LIVE && docBroker)
if (docBroker && (_state == SessionState::LIVE || _state == SessionState::LOADING))
{
setState(SessionState::WAIT_DISCONNECT);