Skip to content
Browse files

Fixed bug with stale token count

  • Loading branch information...
1 parent 27d5606 commit 4625db54fd3bf5c7b481506c7f83a1fc577575c7 @rickhuizinga rickhuizinga committed Aug 2, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/rateLimiter.js
View
1 lib/rateLimiter.js
@@ -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.
Something went wrong with that request. Please try again.