Permalink
Browse files

Merge pull request #13 from ncr/fix_global_variable_leak

Fix global variable leak
  • Loading branch information...
2 parents ce5a4e4 + 32fb4fc commit 8a03a005d7a075dd065b99090d4febf7d6d8c1fb @chriso committed May 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/advanced_structures/RateLimit.js
@@ -129,7 +129,7 @@ RateLimit.prototype.count = function (subject, interval, callback) {
//Add up the counts from each bucket
multi.exec(function (err, counts) {
if (err) return callback(err, null);
- for (var count = i = 0, l = counts.length; i < l; i++) {
+ for (var count = 0, i = 0, l = counts.length; i < l; i++) {
if (counts[i]) {
count += parseInt(counts[i], 10);
}

0 comments on commit 8a03a00

Please sign in to comment.