Call shutdown on the peer's websocket when the session to the client dies
Also, seems that calling LOKitDocument::destroy() (in the child process's LOOLSession dtor) causes crashes, avoid that. The can be little need for any cleanup as the process is about to exit anyway, and the user profile is a temporary one that will be binned.
This commit is contained in:
parent
02f12402bf
commit
a63f797fff
1 changed files with 3 additions and 3 deletions
|
@ -73,10 +73,10 @@ LOOLSession::LOOLSession(WebSocket& ws, LibreOfficeKit *loKit, UInt64 childId) :
|
|||
|
||||
LOOLSession::~LOOLSession()
|
||||
{
|
||||
std::cout << Util::logPrefix() << "LOOLSesstion dtor this=" << this << std::endl;
|
||||
std::cout << Util::logPrefix() << "LOOLSesstion dtor this=" << this << " isChildProcess()=" << (isChildProcess()?"YES":"NO") << " toChildProcess()=" << (toChildProcess()?"YES":"NO") << " _peer=" << _peer << std::endl;
|
||||
_ws->shutdown();
|
||||
if (_loKitDocument)
|
||||
_loKitDocument->pClass->destroy(_loKitDocument);
|
||||
if (!isChildProcess() && !toChildProcess() && _peer != nullptr)
|
||||
_peer->_ws->shutdown();
|
||||
}
|
||||
|
||||
const std::string LOOLSession::jailDocumentURL = "/user/thedocument";
|
||||
|
|
Loading…
Reference in a new issue