From ee29cb11bdb6811bde012f2a4ab9cee11dc8fe60 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Wed, 9 Apr 2025 23:26:02 +0200 Subject: [PATCH] Don't block new PC if connection is stable. No need to (#340) --- ui/src/routes/devices.$id.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ui/src/routes/devices.$id.tsx b/ui/src/routes/devices.$id.tsx index fef1764..1b66bf5 100644 --- a/ui/src/routes/devices.$id.tsx +++ b/ui/src/routes/devices.$id.tsx @@ -243,7 +243,7 @@ export default function KvmIdRoute() { { heartbeat: true, retryOnError: true, - reconnectAttempts: 5, + reconnectAttempts: 15, reconnectInterval: 1000, onReconnectStop: () => { console.log("Reconnect stopped"); @@ -398,11 +398,6 @@ export default function KvmIdRoute() { setConnectionFailed(false); setLoadingMessage("Connecting to device..."); - if (peerConnection?.signalingState === "stable") { - console.log("[setupPeerConnection] Peer connection already established"); - return; - } - let pc: RTCPeerConnection; try { console.log("[setupPeerConnection] Creating peer connection"); @@ -499,7 +494,6 @@ export default function KvmIdRoute() { cleanupAndStopReconnecting, iceConfig?.iceServers, legacyHTTPSignaling, - peerConnection?.signalingState, sendWebRTCSignal, setDiskChannel, setMediaMediaStream,