Skip to content

Commit

Permalink
re-enable sockjs-client
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-muir committed Oct 17, 2023
1 parent 35b09e7 commit 16a79eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/socket-stream-client/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ export class ClientStream extends StreamClientCommon {
...this.options._sockjsOptions
};


this.socket = new WebSocket(toWebsocketUrl(this.rawUrl));
this.socket = __meteor_runtime_config__.DISABLE_SOCKJS
// Convert raw URL to SockJS URL each time we open a connection, so
// that we can connect to random hostnames and get around browser
// per-host connection limits.
? new WebSocket(toWebsocketUrl(this.rawUrl))
: new SockJS(toSockjsUrl(this.rawUrl), undefined, options);

this.socket.onopen = data => {
this.lastError = null;
Expand Down

0 comments on commit 16a79eb

Please sign in to comment.