From 3e9328f9514985de9adde669e1c677e554537e7e Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 3 Sep 2014 15:05:44 -0300 Subject: [PATCH] settings: Insight.js refactor --- js/models/blockchain/Insight.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/models/blockchain/Insight.js b/js/models/blockchain/Insight.js index 00a4dddba..d71ea79a7 100644 --- a/js/models/blockchain/Insight.js +++ b/js/models/blockchain/Insight.js @@ -45,6 +45,7 @@ var Insight = function(opts) { 'secure': opts.schema === 'https' }; + this.socket = this.getSocket(); } util.inherits(Insight, EventEmitter); @@ -105,7 +106,7 @@ Insight.prototype._setMainHandlers = function(url, opts) { /** @private */ -Insight.prototype.getSocket = function(url, opts) { +Insight.prototype.getSocket = function() { if (!this.socket) { this.socket = this._getSocketIO(this.url, this.opts);