From 9fdec3c2db0052c392761709f15e9ef1984268ff Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 4 Dec 2017 17:07:20 +0100 Subject: [PATCH] fix: minfix --- view/lib/ws-client-es6.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/view/lib/ws-client-es6.js b/view/lib/ws-client-es6.js index df4443f..ff2f8e0 100644 --- a/view/lib/ws-client-es6.js +++ b/view/lib/ws-client-es6.js @@ -14,6 +14,7 @@ class WSClient{ /* (1) Store the arguments */ this.server_url = server_url; this.channel_uri = channel_uri; + this.built_url = this.server_url+'/'+this.channel_uri; /* (2) Initialise event data */ this.is_opened = false; // Set to TRUE when connection opened @@ -21,7 +22,7 @@ class WSClient{ this.handler = []; // On reveice handlers /* (3) Create the websocket connection */ - this.ws = new WebSocket(this.server_url+'/'+channel_uri); + this.ws = new WebSocket(this.built_url); /* (2) Bind events @@ -133,7 +134,7 @@ class WSClient{ } /* (3) If not for this channel -> exit */ - if( msg_event.target.url != this.server_url+'/'+this.channel_uri ) + if( msg_event.target.url != this.built_url ) return; /* (3) Try to JSON parse */