Skip to content

Commit

Permalink
Merge pull request #289 from 0xturner/rate-limiter-prisma-memory-leak
Browse files Browse the repository at this point in the history
fix(prisma): cleanup expiry timeout when process exits to prevent memory leak
  • Loading branch information
animir authored Jan 15, 2025
2 parents daa2b37 + 5b71bfd commit d4faf5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/RateLimiterPrisma.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class RateLimiterPrisma extends RateLimiterStoreAbstract {
});
this._clearExpiredHourAgo();
}, 300000); // Clear every 5 minutes
this._clearExpiredTimeoutId.unref();
}
}

Expand Down

0 comments on commit d4faf5b

Please sign in to comment.