From 9a06b424c5599492ccf4fedc6e07a5c38e5a4c9f Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 23 May 2023 01:06:39 -0400 Subject: [PATCH] clean up the shutdown of webapp --- dtp-webapp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtp-webapp.js b/dtp-webapp.js index 1dd4cc1..3787943 100644 --- a/dtp-webapp.js +++ b/dtp-webapp.js @@ -30,7 +30,7 @@ module.config = { module.log = new SiteLog(module, module.config.component); module.shutdown = async ( ) => { - await SitePlatform.shutdown(); + return await SitePlatform.shutdown(); }; (async ( ) => { @@ -50,8 +50,8 @@ module.shutdown = async ( ) => { process.once('SIGINT', async ( ) => { module.log.info('SIGINT received'); module.log.info('requesting shutdown...'); - await module.shutdown(); - const exitCode = await SitePlatform.shutdown(); + const exitCode = await module.shutdown(); + process.nextTick(( ) => { process.exit(exitCode); });