From 8868a8ef32c1dace06b4a6dc7921446e9cceb8f8 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Wed, 9 Apr 2025 23:22:33 +0200 Subject: [PATCH] Don't block new PC if connection is stable. No need to --- 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,