Remove 500ms timer when requestStopService 48/313248/1 submit/tizen/20240621.160024
authorChunling Ye <chunling.ye@samsung.com>
Thu, 20 Jun 2024 09:35:32 +0000 (17:35 +0800)
committerChunling Ye <chunling.ye@samsung.com>
Thu, 20 Jun 2024 09:35:32 +0000 (17:35 +0800)
Fix issue when have requestStopService, but for 500ms timer, durning
this time this app relaunch agian, worker will wake up, but
after 500ms, service app will been stop, so the second time launch
work is not finish.

When really terminateWorker also will have 500ms delay, remove this
delay timer seems has no effect.

Change-Id: I81ead85152ea0851d93dc399069c5c215865ad1a
Signed-off-by: Chunling Ye <chunling.ye@samsung.com>
wrt_app/service/service_runner.ts

index 22803f5a4a39c8b98b3e03d30db84a3d085ab61e..654b56acb987caad5bb957e8b30ae2b5ddffa084 100644 (file)
@@ -47,8 +47,8 @@ function registerExtensionResolver(id: string) {
 }
 
 let requestStopService = (id: string) => {
-  requestStopService = (id: string) => {};
-  setTimeout(() => wrt.stopService(id), 500);
+  console.debug(`requestStopService : ${id}`);
+  wrt.stopService(id);
 }
 
 let app: any = null;