We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cee170c commit 1b6c191Copy full SHA for 1b6c191
client-src/clients/WebsocketClient.js
@@ -8,7 +8,14 @@ const BaseClient = require('./BaseClient');
8
module.exports = class WebsocketClient extends BaseClient {
9
constructor(url) {
10
super();
11
- this.client = new WebSocket(url.replace(/^http/, 'ws'));
+ this.client = new WebSocket(
12
+ ((urlToChange) => {
13
+ let wsUrl = urlToChange;
14
+ wsUrl = wsUrl.replace(/^http/, 'ws');
15
+ wsUrl = wsUrl.replace(/^file/, 'ws');
16
+ return wsUrl;
17
+ })(url)
18
+ );
19
20
this.client.onerror = (err) => {
21
log.error(err);
0 commit comments