fix: resolve conflict browserSocketFactory

This commit is contained in:
Joe Previte 2021-02-25 11:47:02 -07:00
parent 3fd6187503
commit b952616725
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24
1 changed files with 0 additions and 4 deletions

View File

@ -208,12 +208,8 @@ export class BrowserSocketFactory implements ISocketFactory {
}
connect(host: string, port: number, query: string, callback: IConnectCallback): void {
<<<<<<< HEAD
// NOTE@coder: Modified to work against the current path.
const socket = this._webSocketFactory.create(`${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}${window.location.pathname}?${query}&skipWebSocketFrames=false`);
=======
const socket = this._webSocketFactory.create(`ws://${/:/.test(host) ? `[${host}]` : host}:${port}/?${query}&skipWebSocketFrames=false`);
>>>>>>> 89b6e0164fa770333755b11504e19a4232b1a2d4
const errorListener = socket.onError((err) => callback(err, undefined));
socket.onOpen(() => {
errorListener.dispose();