Skip to content

Commit

Permalink
FIX Modify the sockets definition location
Browse files Browse the repository at this point in the history
  • Loading branch information
croatialu committed Apr 30, 2024
1 parent 6927db5 commit 48ea5ee
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ function sendMessage(ws: WebSocket, msg: PeerMessage) {

const DEFAULT_SIGNALING_SERVER_HOSTNAME = 'signaling.rxdb.info';
export const DEFAULT_SIGNALING_SERVER = 'wss://' + DEFAULT_SIGNALING_SERVER_HOSTNAME + '/';
const sockets = new Map<string, WebSocket>();
let defaultServerWarningShown = false;

export type SimplePeerWrtc = SimplePeerOptions['wrtc'];
Expand Down Expand Up @@ -130,6 +129,7 @@ export function getConnectionHandlerSimplePeer({
const response$ = new Subject<PeerWithResponse<SimplePeer>>();
const error$ = new Subject<RxError | RxTypeError>();

const sockets = new Map<string, WebSocket>();
const peers = new Map<string, SimplePeer>();
let closed = false;
let ownPeerId: string;
Expand Down Expand Up @@ -246,6 +246,7 @@ export function getConnectionHandlerSimplePeer({
}
}
}
return socket
};

const creator: WebRTCConnectionHandlerCreator<SimplePeer> = async (options: SyncOptionsWebRTC<any, SimplePeer>) => {
Expand Down

0 comments on commit 48ea5ee

Please sign in to comment.