lazy connect

This commit is contained in:
Matias Alejo Garcia 2014-09-09 13:45:50 -03:00
commit b516e844a8
2 changed files with 2 additions and 7 deletions

View file

@ -124,12 +124,7 @@ Insight.prototype.requestPost = function(path, data, cb) {
}
Insight.prototype.destroy = function() {
console.log('[Insight.js.127] INSIGHT destroy' ); //TODO
var socket = this.getSocket();
this.socket.disconnect();
this.socket.removeAllListeners();
this.socket = null;
this.getSocket().destroy();
this.subscribed = {};
this.status = this.STATUS.DESTROYED;
this.removeAllListeners();

View file

@ -282,7 +282,7 @@ angular.module('copayApp.services')
var allAddrs = $rootScope.addrInfos;
var newAddrs = [];
for (var i in allAddrs) {
for:(var i in allAddrs) {
var a = allAddrs[i];
if (!currentAddrs[a.addressStr] && !a.isChange)
newAddrs.push(a.addressStr);