From b1e2dcdbd30f9528142f1e1469d34cd86574568e Mon Sep 17 00:00:00 2001 From: Michael Courtin Date: Fri, 3 Dec 2021 11:59:18 +0100 Subject: [PATCH] fix: shutdown hook configuration is using wrong config key In the api-server constructor the evaluation for the activation / deactivation of the shutdown hook is based on the wrong configuration property so that it always is falling back to the default value and pre-configured value is not taken. Closes: #1619 Signed-off-by: Michael Courtin --- .../cactus-cmd-api-server/src/main/typescript/api-server.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts index 4c0e87f508e..75dcda5cb34 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts @@ -109,8 +109,10 @@ export class ApiServer { throw new Error(`ApiServer#ctor options.config was falsy`); } - this.enableShutdownHook = Bools.isBooleanStrict(options.enableShutdownHook) - ? (options.enableShutdownHook as boolean) + this.enableShutdownHook = Bools.isBooleanStrict( + options.config.enableShutdownHook, + ) + ? (options.config.enableShutdownHook as boolean) : true; if (this.enableShutdownHook) {