disconnect working
This commit is contained in:
parent
55ba5e6d37
commit
1b87083579
3 changed files with 8 additions and 4 deletions
|
|
@ -134,7 +134,8 @@ Wallet.prototype._handleConnect = function(newCopayerId) {
|
|||
this.emit('connect', peerID);
|
||||
};
|
||||
|
||||
Wallet.prototype._handleDisconnect = function(copayerID) {
|
||||
Wallet.prototype._handleDisconnect = function(peerID) {
|
||||
this.emit('disconnect', peerID);
|
||||
};
|
||||
|
||||
Wallet.prototype._optsToObj = function() {
|
||||
|
|
|
|||
|
|
@ -115,9 +115,9 @@ Network.prototype._deletePeer = function(peerId) {
|
|||
this.connectedPeers = Network._arrayRemove(peerId, this.connectedPeers);
|
||||
};
|
||||
|
||||
Network.prototype._onClose = function(peerId) {
|
||||
this._deletePeer(peerId);
|
||||
this.emit('disconnect');
|
||||
Network.prototype._onClose = function(peerID) {
|
||||
this._deletePeer(peerID);
|
||||
this.emit('disconnect', peerID);
|
||||
};
|
||||
|
||||
Network.prototype.connectToCopayers = function(copayerIds) {
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@ angular.module('copay.controllerUtils')
|
|||
}
|
||||
$rootScope.$digest();
|
||||
});
|
||||
w.on('disconnect', function(peerID) {
|
||||
$rootScope.$digest();
|
||||
});
|
||||
w.on('close', root.onErrorDigest);
|
||||
w.netStart();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue