fix: minfix

This commit is contained in:
xdrm-brackets 2017-12-04 17:07:20 +01:00
parent 360c2f7133
commit 9fdec3c2db
1 changed files with 3 additions and 2 deletions

View File

@ -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 */