Skip to content

Commit

Permalink
removed debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
pilif committed Jun 25, 2010
1 parent db17a09 commit 44cf811
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/tempalias_http.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ fs.realpath('lib/../public', function(err, public_root){


var rbl_check = function(){ var rbl_check = function(){
if (config.http.rbls){ if (config.http.rbls){
sys.debug('rbls set');
var addr = req.socket.remoteAddress; var addr = req.socket.remoteAddress;
require('rbl').check(addr, config.http.rbls, function(found){ require('rbl').check(addr, config.http.rbls, function(found){
if (found){ if (found){
Expand All @@ -113,17 +112,14 @@ fs.realpath('lib/../public', function(err, public_root){
if (!lr){ if (!lr){
redis.get(lock_key, function(exp){ redis.get(lock_key, function(exp){
if (parseInt(exp, 10) < (t)){ if (parseInt(exp, 10) < (t)){
sys.debug('lock key found but expired');
redis.set(lock_key, t+config.http.rate_limit, function(){ redis.set(lock_key, t+config.http.rate_limit, function(){
sys.debug('lock key updated');
rbl_check(); rbl_check();
}); });
}else{ }else{
err(403, {error: 'rate-limited', description: 'please wait a moment before generating the next alias'}); err(403, {error: 'rate-limited', description: 'please wait a moment before generating the next alias'});
} }
}); });
}else{ }else{
sys.debug('lock key not found. Was set to '+lr);
rbl_check(); rbl_check();
} }
}); });
Expand Down

0 comments on commit 44cf811

Please sign in to comment.