Security and Code Quality Remediation (M6-Fixes) #343

Merged
jason.woltje merged 57 commits from fix/security into develop 2026-02-06 17:49:14 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 22446acd8a - Show all commits

View File

@@ -24,6 +24,10 @@ vi.mock("ioredis", () => {
return this; return this;
} }
removeAllListeners() {
return this;
}
// String operations // String operations
async setex(key: string, ttl: number, value: string) { async setex(key: string, ttl: number, value: string) {
store.set(key, value); store.set(key, value);

View File

@@ -63,8 +63,10 @@ export class ValkeyService implements OnModuleInit, OnModuleDestroy {
} }
} }
async onModuleDestroy() { async onModuleDestroy(): Promise<void> {
this.logger.log("Disconnecting from Valkey"); this.logger.log("Disconnecting from Valkey");
// Remove all event listeners to prevent memory leaks
this.client.removeAllListeners();
await this.client.quit(); await this.client.quit();
} }