mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
manager: fix reconnect attempts start
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user