Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

manager: fix reconnect attempts start

  • Loading branch information...
commit c3a04f704bd61cf39aedff476b50cdb671a5ca6f 1 parent 558f8b2
@rauchg rauchg authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/manager.js
View
7 lib/manager.js
@@ -41,6 +41,7 @@ function Manager(socket, opts){
if (!socket || !socket.write) socket = eio(socket, opts);
this.engine = socket;
this.connected = 0;
+ this.attempts = 0;
this.open();
}
@@ -319,9 +320,9 @@ Manager.prototype.reconnect = function(){
this.emit('reconnect_failed');
this.reconnecting = false;
} else {
- var delay = this.attempts * this._reconnectionDelay;
- delay = Math.min(delay, this._reconnectionDelayMax);
- debug('will wait %d before reconnect attempt', delay);
+ var delay = this.attempts * this.reconnectionDelay();
+ delay = Math.min(delay, this.reconnectionDelayMax());
+ debug('will wait %dms before reconnect attempt', delay);
this.reconnecting = true;
var timer = setTimeout(function(){
Please sign in to comment.
Something went wrong with that request. Please try again.