lazy connect
This commit is contained in:
parent
fb05586c32
commit
b516e844a8
2 changed files with 2 additions and 7 deletions
|
|
@ -124,12 +124,7 @@ Insight.prototype.requestPost = function(path, data, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Insight.prototype.destroy = function() {
|
Insight.prototype.destroy = function() {
|
||||||
|
this.getSocket().destroy();
|
||||||
console.log('[Insight.js.127] INSIGHT destroy' ); //TODO
|
|
||||||
var socket = this.getSocket();
|
|
||||||
this.socket.disconnect();
|
|
||||||
this.socket.removeAllListeners();
|
|
||||||
this.socket = null;
|
|
||||||
this.subscribed = {};
|
this.subscribed = {};
|
||||||
this.status = this.STATUS.DESTROYED;
|
this.status = this.STATUS.DESTROYED;
|
||||||
this.removeAllListeners();
|
this.removeAllListeners();
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ angular.module('copayApp.services')
|
||||||
var allAddrs = $rootScope.addrInfos;
|
var allAddrs = $rootScope.addrInfos;
|
||||||
|
|
||||||
var newAddrs = [];
|
var newAddrs = [];
|
||||||
for (var i in allAddrs) {
|
for:(var i in allAddrs) {
|
||||||
var a = allAddrs[i];
|
var a = allAddrs[i];
|
||||||
if (!currentAddrs[a.addressStr] && !a.isChange)
|
if (!currentAddrs[a.addressStr] && !a.isChange)
|
||||||
newAddrs.push(a.addressStr);
|
newAddrs.push(a.addressStr);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue