From 7995b8a5d9787b14705b7af2cf1ca4fe7290d1de Mon Sep 17 00:00:00 2001 From: Drew R Date: Mon, 15 Jun 2026 19:10:52 +0100 Subject: [PATCH] Delete from the static Set of tokens instead of clearing it to fix bug causing connections not to be quit when >1 named provider --- packages/ioredis/lib/modules/redis-core.module.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ioredis/lib/modules/redis-core.module.ts b/packages/ioredis/lib/modules/redis-core.module.ts index 87bd6ec..fc6cdc6 100644 --- a/packages/ioredis/lib/modules/redis-core.module.ts +++ b/packages/ioredis/lib/modules/redis-core.module.ts @@ -32,9 +32,9 @@ export class RedisCoreModule implements OnApplicationShutdown { if (connection && typeof connection.quit === 'function') { await connection.quit(); } - } catch {} - } - RedisCoreModule.connectionTokens.clear(); + RedisCoreModule.connectionTokens.delete(token); + } catch {} + } } static forRoot(