From eadcbd422b27a662e2412ea5706f8ab1b31d3a47 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Mon, 13 Sep 2021 18:13:55 +0900 Subject: [PATCH] [Service] Handle exception if workerData is empty Sometimes, we are facing, there is a case of workerData is empty. empty 'id' makes kind of smack error and JavaScript errors. This issue has been reported from long aging test. Change-Id: Ib287eecc3906e313dc5b23491aa04939b88543cf Signed-off-by: DongHyun Song --- wrt_app/service/service_runner.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wrt_app/service/service_runner.ts b/wrt_app/service/service_runner.ts index e3cb9bd..63766c7 100644 --- a/wrt_app/service/service_runner.ts +++ b/wrt_app/service/service_runner.ts @@ -132,6 +132,11 @@ export function stop(id: string) { function run() { let id = workerData.id; + if (!id) { + console.debug('workerData.id is empty!'); + process.exit(); + } + Object.defineProperty(global, 'internalId', { value: id, writable: false -- 2.7.4