Giter VIP home page Giter VIP logo

Comments (6)

blakemorgan avatar blakemorgan commented on August 17, 2024 1

It's not a pain point because of the workaround. If it can get on the roadmap for the future, then that'd be fine.

from byu-jwt-nodejs.

blakemorgan avatar blakemorgan commented on August 17, 2024

A found a work around by handling the SIGINT event and calling process.exit(0).

from byu-jwt-nodejs.

GaryGSC avatar GaryGSC commented on August 17, 2024

That's probably because of these lines:

  process.on('exit', () => shutdown('exit', data)) // app is closing
  process.on('SIGINT', () => shutdown('SIGINT', data)) // catches ctrl+c event
  process.on('SIGBREAK', () => shutdown('SIGBREAK', data)) // catches Windows ctrl+c event
  process.on('SIGUSR1', () => shutdown('SIGUSR1', data)) // catches "kill pid"
  process.on('SIGUSR2', () => shutdown('SIGUSR2', data)) // catches "kill pid"

I don't know the original motivation for doing things this way instead of exposing shutdown to users and expecting them to call it as needed.

If this behavior continues to be a pain point, we can change it in a future major release.

from byu-jwt-nodejs.

stuft2 avatar stuft2 commented on August 17, 2024

Add this line of code to your server file:

process.on('SIGINT', () => process.exit())

from byu-jwt-nodejs.

stuft2 avatar stuft2 commented on August 17, 2024

@GaryGSC Is there a problem exiting without clearing timeouts? I think we can remove those lines and expose a clearCache function instead of the shutdown function.

from byu-jwt-nodejs.

stuft2 avatar stuft2 commented on August 17, 2024

fixed in #89

from byu-jwt-nodejs.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.