Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/autoPipelining.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ function executeAutoPipeline(client, slotKey: string) {
client._autoPipelines.delete(slotKey);

const callbacks = pipeline[kCallbacks];
// Stop keeping a reference to callbacks immediately after the callbacks stop being used.
// This allows the GC to reclaim objects referenced by callbacks, especially with 16384 slots
// in Redis.Cluster
pipeline[kCallbacks] = null;

// Perform the call
pipeline.exec(function (err, results) {
Expand Down