Skip to content

Commit

Permalink
Diable socket.io client side
Browse files Browse the repository at this point in the history
(cherry picked from commit 9247001)
  • Loading branch information
oharsta authored and baszoetekouw committed Nov 14, 2022
1 parent 3898789 commit 47a3702
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions client/src/utils/SocketIO.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
import {io} from "socket.io-client";
import {config} from "../api";

let initializedSocket = null;

export const socket = initializedSocket ? Promise.resolve(initializedSocket) :
config().then(res => {
initializedSocket = io(res.socket_url, {
transports: ["websocket"],
cors: {
origin: `${window.location.protocol}//${window.location.host}/`,
},
});
return initializedSocket;
});

export const socket = initializedSocket ? Promise.resolve(initializedSocket) : Promise.resolve({on: () => true})
export const subscriptionIdCookieName = "subscription_id";

0 comments on commit 47a3702

Please sign in to comment.