Skip to content

Commit

Permalink
fix: shutdown hook configuration is using wrong config key
Browse files Browse the repository at this point in the history
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: hyperledger-cacti#1619
Signed-off-by: Michael Courtin <michael.courtin@accenture.com>
  • Loading branch information
m-courtin committed Dec 3, 2021
1 parent 45c4a69 commit b1e2dcd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b1e2dcd

Please sign in to comment.