Permalink
Browse files

Fixes to last commit

  • Loading branch information...
1 parent 1be1091 commit d0e79fea19cbb8bfa12ccdf20bbaa20ef7db1871 @smfreegard smfreegard committed Jun 18, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 plugins/toobusy.js
View
@@ -1,7 +1,7 @@
// Stop accepting new connections when we are too busy
var toobusy = require('toobusy');
-var was_busy = 0;
+var was_busy = false;
exports.register = function () {
var self = this;
@@ -28,8 +28,9 @@ exports.hook_lookup_rdns = function (next, connection) {
var maxLag = toobusy.maxLag();
this.logcrit('deferring connections: lag=' + currentLag + ' max=' + maxLag);
}
+ was_busy = true;
return next(DENYSOFTDISCONNECT, 'Too much load; please try again later');
}
- was_busy = 0;
+ was_busy = false;
return next();
}

0 comments on commit d0e79fe

Please sign in to comment.