Handle channel names ending with a slash better

This commit is contained in:
Ken-Håvard Lieng 2017-06-13 04:25:59 +02:00
parent f03b30eff6
commit 0f5c3b57d2
8 changed files with 96 additions and 40 deletions

View file

@ -3,7 +3,7 @@ import Backoff from 'backo';
export default class Socket {
constructor(host) {
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
this.url = `${protocol}://${host}/ws?path=${window.location.pathname}`;
this.url = `${protocol}://${host}/ws${window.location.pathname}`;
this.connectTimeout = 20000;
this.pingTimeout = 30000;