rm variable reconnect time

This commit is contained in:
Matias Alejo Garcia 2014-06-09 19:35:30 -03:00
commit be7e122b0a
4 changed files with 22 additions and 33 deletions

View file

@ -164,7 +164,6 @@ Wallet.prototype._handleData = function(senderId, data, isInbound) {
Wallet.prototype._handleConnect = function(newCopayerId) {
if (newCopayerId) {
this.log('#### Setting new COPAYER:', newCopayerId);
this.currentDelay = null;
this.sendWalletId(newCopayerId);
}
var peerID = this.network.peerFromCopayer(newCopayerId)
@ -276,8 +275,7 @@ Wallet.prototype.scheduleConnect = function() {
var self = this;
if (self.network.isOnline()) {
self.connectToAll();
self.currentDelay = self.currentDelay*2 || self.reconnectDelay;
setTimeout(self.scheduleConnect.bind(self), self.currentDelay);
setTimeout(self.scheduleConnect.bind(self), self.reconnectDelay);
}
}

View file

@ -126,6 +126,7 @@ Network.prototype._onClose = function(peerID) {
Network.prototype.connectToCopayers = function(copayerIds) {
var self = this;
var arrayDiff= Network._arrayDiff(copayerIds, this.connectedCopayers());
console.log('[WebRTC.js.128:arrayDiff:]',arrayDiff); //TODO
arrayDiff.forEach(function(copayerId) {
if (this.allowedCopayerIds && !this.allowedCopayerIds[copayerId]) {