INNER CODE UNIT · JavaScript

shutdown

vestauth/vestauth · src/server/index.js:210

  const shutdown = () => {
    close()
      .then(() => process.exit(0))
      .catch((err) => {
        logger.error(err)
        process.exit(1)
      })
  }

  SIGNAL_HANDLERS = {
    SIGINT: () => shutdown('SIGINT'),
    SIGTERM: () => shutdown('SIGTERM')
  }

  process.once('SIGINT', SIGNAL_HANDLERS.SIGINT)
  process.once('SIGTERM', SIGNAL_HANDLERS.SIGTERM)
  SIGNAL_HANDLERS_INSTALLED = true
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…