Skip to content

Commit a8915c9

Browse files
authored
Merge pull request #6 from WebPlatformForEmbedded/timer
closeTime handling updated
2 parents 6050fc5 + 2a62e40 commit a8915c9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Launcher.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
3333

3434
config.FromString(_service->ConfigLine());
3535

36+
_closeTime = (config.CloseTime.Value());
37+
3638
if (config.ScheduleTime.IsSet() == true) {
3739

3840
timeMode = config.ScheduleTime.Mode.Value();
@@ -115,14 +117,14 @@ SERVICE_REGISTRATION(Launcher, 1, 0);
115117
_memory->Release();
116118
_memory = nullptr;
117119
}
118-
119120
if (_activity->Process().IsActive() == true) {
120121
// First try a gentle touch....
121122
_activity->Process().Kill(false);
122123

123124
// Wait for a maximum of 3 Seconds before we shoot the process!!
124125
if (_activity->Process().WaitProcessCompleted(_closeTime * 1000) != Core::ERROR_NONE) {
125126
_activity->Process().Kill(true);
127+
_activity->Process().WaitProcessCompleted(_closeTime * 1000);
126128
}
127129
}
128130

0 commit comments

Comments
 (0)