Skip to content

Commit

Permalink
Socket replacement iVis-at-Bilkent#280
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkemsolun committed Aug 25, 2023
1 parent 6043de9 commit 34f40d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/pathway-mapper/src/managers/ShareDBManager.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import _, { add } from "lodash";
import { toast, ToastContainer } from "react-toastify";
import _ from "lodash";
import { ChatMessageMetaData, IColorValueMap } from "../ui/react-pathway-mapper";
import GraphUtilities from "../utils/GraphUtilities";
import EditorActionsManager from "./EditorActionsManager";
Expand Down Expand Up @@ -204,6 +203,9 @@ export default class ShareDBManager {
initShareDB() {
sharedb = require('sharedb/lib/client');
socket = new WebSocket('ws://' + window.location.host);
if (window.location.protocol === 'https:') {
socket = socket.replace('ws:', 'wss:');
}
connection = new sharedb.Connection(socket);

var self = this;
Expand Down

0 comments on commit 34f40d0

Please sign in to comment.