Permalink
Browse files

added missing 'var' to local variable declaration

  • Loading branch information...
1 parent d42e618 commit 572e45a131cbdf3a8ef1503f97e588514604becc @mef mef committed Jan 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tuiter.js
View
@@ -124,7 +124,7 @@ var APIRequest = function(endpoint, params, callback) {
req.end(function(res){
debug('data received for %s', endpoint.resource);
if (res.statusCode == 429) {
- sleep_duration = (res.header['x-rate-limit-reset']*1000 - new Date()) + 7000;
+ var sleep_duration = (res.header['x-rate-limit-reset']*1000 - new Date()) + 7000;
debug('rate limit reached, sleeping during', Math.ceil(sleep_duration/60000), 'minutes');
setTimeout(function() {
debug('rate limit reset, resuming extraction...');

0 comments on commit 572e45a

Please sign in to comment.