Skip to content

Commit 457344d

Browse files
committed
[COMPILER] Fixed a missing attribute..
1 parent ca0609d commit 457344d

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

Launcher.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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()));

Launcher.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ class Launcher : public PluginHost::IPlugin {
738738
, _memory(nullptr)
739739
, _notification(this)
740740
, _activity()
741+
, _deactivationInProgress()
741742
{
742743
}
743744
#ifdef __WIN32__
@@ -783,6 +784,7 @@ class Launcher : public PluginHost::IPlugin {
783784
Exchange::IMemory* _memory;
784785
Core::Sink<Notification> _notification;
785786
Core::ProxyType<Job> _activity;
787+
bool _deactivationInProgress;
786788

787789
static ProcessObserver _observer;
788790
};

0 commit comments

Comments
 (0)