core icon indicating copy to clipboard operation
core copied to clipboard

Process remains running after server close

Open simov opened this issue 3 years ago • 2 comments

Any idea why after server.close the process remains running?

The session middleware seems to be the cause:

app.use(session({store: 'memory'}))

Ok, it's the scheduleGc https://github.com/curveball/session/blob/master/src/memorystore.ts#L97 ...

simov avatar Oct 10 '20 16:10 simov

Yes... any further thoughts about this? I don't know if this is easily fixable, but I suppose we could add a function to stop the interval.

evert avatar Oct 12 '20 07:10 evert

Definitely opting out will be awesome. Right now I'm monkey-patching setTimeout so that I can close it on server close ..

simov avatar Oct 12 '20 07:10 simov