[Service] Prevent multiple calls of wrt.stopService() 30/247030/5
authorDongHyun Song <dh81.song@samsung.com>
Fri, 6 Nov 2020 07:55:37 +0000 (16:55 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Mon, 9 Nov 2020 01:22:01 +0000 (10:22 +0900)
In case of RakutenTV app, it calls tizen.application...exit()
twice. Of course WRTServiceManager::Remove() will skip stopService
at the second time, this patch can skip stopService() sequence more
early time.

Change-Id: I65fdfb13f28834e4093f6be7888054e6aec7162b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/common/service_runner.ts

index 2624f12..1112196 100644 (file)
@@ -34,7 +34,8 @@ function registerExtensionResolver(id: string) {
   }
 }
 
-function requestStopService(id: string) {
+let requestStopService = (id: string) => {
+  requestStopService = (id: string) => {};
   setTimeout(() => wrt.stopService(id), 500);
 }