Browse Source

FIxed protocol's url replace

dev1
Alexander Shitikov 5 years ago
parent
commit
5e76c1ff05
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      modules/xmpp/XmppConnection.js

+ 1
- 1
modules/xmpp/XmppConnection.js View File

325
             logger.debug(`Scheduling next WebSocket keep-alive in ${intervalWithJitter}ms`);
325
             logger.debug(`Scheduling next WebSocket keep-alive in ${intervalWithJitter}ms`);
326
 
326
 
327
             this._wsKeepAlive = setTimeout(() => {
327
             this._wsKeepAlive = setTimeout(() => {
328
-                const url = this.service.replace('wss', 'https').replace('ws', 'http');
328
+                const url = this.service.replace('wss://', 'https://').replace('ws://', 'http://');
329
 
329
 
330
                 fetch(url).catch(
330
                 fetch(url).catch(
331
                     error => {
331
                     error => {

Loading…
Cancel
Save