Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed backoffmax to something less geological, time-wise.

  • Loading branch information...
commit ef733087810f8b40caed750dd71fbb21aa0ea1f5 1 parent f2d0bfe
Jeremy Childs authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 LDAP.js
8 LDAP.js
View
@@ -46,8 +46,8 @@ var LDAP = function(opts) {
}
opts.timeout = opts.timeout || 5000;
- opts.backoff = -1;
- opts.backoffmax = opts.backoffmax || 30000;
+ opts.backoff = 1; //sec
+ opts.backoffmax = opts.backoffmax || 32; //sec
self.BASE = 0;
self.ONELEVEL = 1;
@@ -117,7 +117,7 @@ var LDAP = function(opts) {
function backoff() {
stats.backoffs++;
- opts.backoff++;
+ opts.backoff *= 2;
if (opts.backoff > opts.backoffmax)
opts.backoff = opts.backoffmax;
return opts.backoff * 1000;
@@ -132,7 +132,7 @@ var LDAP = function(opts) {
reconnect();
} else {
stats.reconnects++;
- opts.backoff = -1;
+ opts.backoff = 1;
replayCallbacks();
reconnecting = false;
Please sign in to comment.
Something went wrong with that request. Please try again.