1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

Merge pull request #752 from dohse/fix-queue-leak

Allow garbage collection of processed queue items
This commit is contained in:
Ruben Bridgewater
2015-09-04 05:23:35 +02:00

View File

@@ -20,7 +20,10 @@ Queue.prototype.shift = function () {
return; return;
} }
} }
return this.head[this.offset++]; // sorry, JSLint var item = this.head[this.offset];
this.head[this.offset] = null;
this.offset++;
return item;
}; };
Queue.prototype.push = function (item) { Queue.prototype.push = function (item) {