Skip to content

Test storage adapters allow process to exit #47

@lukechilds

Description

@lukechilds

Test storage adapters allow process to exit.

Otherwise the process may hang if the storage adapter keeps a connection open.

We should add something like this in the constructor:

process.on('exit', () => {
    this.opts.store.closeConnection && this.opts.store.closeConnection();
});

Related: https://github.com/lukechilds/keyv-redis/issues/12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions