Permalink
Browse files

Fixed bug with stale token count

  • Loading branch information...
rickhuizinga committed Aug 2, 2013
1 parent 27d5606 commit 4625db54fd3bf5c7b481506c7f83a1fc577575c7
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/rateLimiter.js
View
@@ -91,6 +91,7 @@ RateLimiter.prototype = {
* @returns {Number} The number of tokens remaining.
*/
getTokensRemaining: function () {
+ this.tokenBucket.drip();
return this.tokenBucket.content;
}
};

0 comments on commit 4625db5

Please sign in to comment.