From 4a55bd6b7776929cecbf40558b4eb50057c92076 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Mon, 27 Jan 2025 22:05:44 +0000 Subject: [PATCH] up --- src/services/webRTC/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/webRTC/index.ts b/src/services/webRTC/index.ts index 721ef8e9..9e684e79 100644 --- a/src/services/webRTC/index.ts +++ b/src/services/webRTC/index.ts @@ -52,7 +52,7 @@ export default class webRTC { const key = this.getConnectionsKey(u) console.log("connect", key) if (this.connections[key]) { - throw new Error('Connection already exists') + this.connections[key].close() } const conn = new wrtc.RTCPeerConnection(configuration) as RTCPeerConnection conn.onicecandidate = (event) => {