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); });