diff --git a/src/lib/acker.ts b/src/lib/acker.ts index feebe05..3d7d2ed 100644 --- a/src/lib/acker.ts +++ b/src/lib/acker.ts @@ -20,8 +20,9 @@ export const createAcker = () => { } }, REQUEUE_CHECK); - process.on('exit', () => { + process.on('exit', async () => { clearTimeout(timeout); + await pool.end(); }); return async (message: Notification) => {