Closed eavdmeer closed 3 years ago
Did you call stopInterval
on your memorystore instance?
https://github.com/roccomuso/memorystore/blob/master/lib/memorystore.js#L280
I might add an unref
in a near future: https://httptoolkit.tech/blog/unblocking-node-with-unref/#timeoutunref
to avoid memorystore from keeping the process alive.
That's actually a very good point. I did not stop the interval time. I'll have a look at it first thing in the morning! Thanks!
I can confirm that this works as it should. After calling stopInterval()
, the process exits correctly.
Just for info: Unref was implemented in https://github.com/roccomuso/memorystore/commit/e16e29b86c08588c0ecf1642e6264c40364a8ade and released in 1.6.7
If all other resources in my program exit, which should stop the program, it keeps running because of MemoryStore:
With FileStore, the process exits. With MemoryStore, it hangs.