Skip to content

Commit 9d17e1a

Browse files
adamshiervaniym
authored andcommitted
Don't block new PC if connection is stable. No need to (jetkvm#340)
1 parent a8a807a commit 9d17e1a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

ui/src/routes/devices.$id.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default function KvmIdRoute() {
243243
{
244244
heartbeat: true,
245245
retryOnError: true,
246-
reconnectAttempts: 5,
246+
reconnectAttempts: 15,
247247
reconnectInterval: 1000,
248248
onReconnectStop: () => {
249249
console.log("Reconnect stopped");
@@ -398,11 +398,6 @@ export default function KvmIdRoute() {
398398
setConnectionFailed(false);
399399
setLoadingMessage("Connecting to device...");
400400

401-
if (peerConnection?.signalingState === "stable") {
402-
console.log("[setupPeerConnection] Peer connection already established");
403-
return;
404-
}
405-
406401
let pc: RTCPeerConnection;
407402
try {
408403
console.log("[setupPeerConnection] Creating peer connection");
@@ -499,7 +494,6 @@ export default function KvmIdRoute() {
499494
cleanupAndStopReconnecting,
500495
iceConfig?.iceServers,
501496
legacyHTTPSignaling,
502-
peerConnection?.signalingState,
503497
sendWebRTCSignal,
504498
setDiskChannel,
505499
setMediaMediaStream,

0 commit comments

Comments
 (0)