hapijs / catbox-memory

Memory adapter for catbox
Other
33 stars 30 forks source link

fix: cancel timeouts on drop #42

Closed zenlor closed 7 years ago

zenlor commented 7 years ago

Clear timeouts if the item is being dropped. Timers were hanging the process in my tap tests.

ex:

test('Something important', t => co(function * () {
    const id = 'an-id';
    const segment = 'segment';

    // assume promisified methods
    yield cache.set({id, segment }, 'useless value', 1440000);
    yield cache.drop({ id, segment });

    cache.stop();
    t.end();
    // timeout at this point
}));
hueniverse commented 7 years ago

@geek ping.

geek commented 7 years ago

@hueniverse yikes! Thanks for the ping. @aliem sorry for the delay.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.