@@ -30,6 +30,7 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
3030
3131 // Setup skip URL for right offset.
3232 _service = service;
33+ _deactivationInProgress = false ;
3334
3435 config.FromString (_service->ConfigLine ());
3536
@@ -58,6 +59,8 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
5859 ASSERT (_memory != nullptr );
5960 ASSERT (_activity.IsValid () == true );
6061
62+ _deactivationInProgress = true ;
63+
6164 _memory->Observe (0 );
6265
6366 _activity->Shutdown ();
@@ -99,8 +102,11 @@ void Launcher::Update(const ProcessObserver::Info& info)
99102 }
100103 }
101104 else if (_activity->Continuous () == false ) {
102- TRACE (Trace::Information, (_T (" Launcher [%s] has run succesfully, deactivation requested." ), _service->Callsign ().c_str ()));
103- PluginHost::WorkerPool::Instance ().Submit (PluginHost::IShell::Job::Create (_service, PluginHost::IShell::DEACTIVATED, PluginHost::IShell::AUTOMATIC));
105+ if (_deactivationInProgress == false ) {
106+ _deactivationInProgress = true ;
107+ TRACE (Trace::Information, (_T (" Launcher [%s] has run succesfully, deactivation requested." ), _service->Callsign ().c_str ()));
108+ PluginHost::WorkerPool::Instance ().Submit (PluginHost::IShell::Job::Create (_service, PluginHost::IShell::DEACTIVATED, PluginHost::IShell::AUTOMATIC));
109+ }
104110 }
105111 else {
106112 TRACE (Trace::Information, (_T (" Launcher [%s] has run succesfully, scheduled for the next run." ), _service->Callsign ().c_str ()));
0 commit comments