bccu#1678: Check whether document can be discarded also in stop predicate

Seems to fix the problem that the loolkit processes hang around
forever even if there is no associated client.
This commit is contained in:
Tor Lillqvist 2016-04-13 12:17:59 +03:00
parent 04f3a9e111
commit c8a46e78a8

View file

@ -1064,7 +1064,12 @@ void lokit_main(const std::string& childRoot,
return true;
},
[](){ return TerminationFlag; });
[&document]()
{
if (document && document->canDiscard())
TerminationFlag = true;
return TerminationFlag;
});
// Cleanup jail.
Util::removeFile(jailPath, true);