settings: Insight.js refactor
This commit is contained in:
parent
c1d8103374
commit
3e9328f951
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue