Don't block new PC if connection is stable. No need to (#340)

This commit is contained in:
Adam Shiervani 2025-04-09 23:26:02 +02:00 committed by Siyuan Miao
parent 98af805089
commit 960ef230ba
1 changed files with 1 additions and 7 deletions

View File

@ -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,