From 8213cc896c74ca08ee231aa557eac302445c933e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 10 Aug 2020 20:44:52 +0300 Subject: SL-3704 Give plugins some time to terminate requestExit() doesn't close CEF, command sets CEF into closing state which will be processed on update() --- indra/llplugin/llpluginprocesschild.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llplugin') diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index c5304d2ccf..d93ec8cf4b 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -225,6 +225,18 @@ void LLPluginProcessChild::idle(void) } setState(STATE_UNLOADED); } + + if (mInstance) + { + // Provide some time to the plugin + // example: CEF on "cleanup" sets shutdown request, but it still needs idle loop to actually shutdown + LLPluginMessage message("base", "idle"); + message.setValueReal("time", PLUGIN_IDLE_SECONDS); + sendMessageToPlugin(message); + + mInstance->idle(); + } + break; case STATE_UNLOADED: -- cgit v1.2.3