Web: Socket: fixed double socket connection
This commit is contained in:
parent
4de4798cb8
commit
a4e7d2b0ca
@ -874,22 +874,11 @@ class SettingsStore {
|
||||
this.publicRoomKey = key;
|
||||
};
|
||||
|
||||
socketFilesClient: SocketIOHelper | null = null;
|
||||
|
||||
get socketHelper() {
|
||||
const socketUrl = isPublicRoom() && !this.publicRoomKey ? "" : "/socket.io"; // this.socketUrl;
|
||||
const socketUrl =
|
||||
isPublicRoom() && !this.publicRoomKey ? "" : this.socketUrl;
|
||||
|
||||
if (!this.socketFilesClient) {
|
||||
this.socketFilesClient = new SocketIOHelper(
|
||||
socketUrl,
|
||||
this.publicRoomKey,
|
||||
);
|
||||
|
||||
// TODO: comment this line
|
||||
window.socketFilesClient = this.socketFilesClient;
|
||||
}
|
||||
|
||||
return this.socketFilesClient;
|
||||
return new SocketIOHelper(socketUrl, this.publicRoomKey);
|
||||
}
|
||||
|
||||
getBuildVersionInfo = async () => {
|
||||
|
@ -116,6 +116,9 @@ class SocketIOHelper {
|
||||
console.log("socket connect error", err),
|
||||
);
|
||||
this.client.on("disconnect", () => console.log("socket is disconnected"));
|
||||
|
||||
// DEV tests
|
||||
// window.socketHelper = this;
|
||||
}
|
||||
|
||||
get isEnabled() {
|
||||
|
Loading…
Reference in New Issue
Block a user