mirror of https://github.com/jetkvm/kvm.git
Don't block new PC if connection is stable. No need to (#340)
This commit is contained in:
parent
bf89e038ee
commit
ee29cb11bd
|
@ -243,7 +243,7 @@ export default function KvmIdRoute() {
|
||||||
{
|
{
|
||||||
heartbeat: true,
|
heartbeat: true,
|
||||||
retryOnError: true,
|
retryOnError: true,
|
||||||
reconnectAttempts: 5,
|
reconnectAttempts: 15,
|
||||||
reconnectInterval: 1000,
|
reconnectInterval: 1000,
|
||||||
onReconnectStop: () => {
|
onReconnectStop: () => {
|
||||||
console.log("Reconnect stopped");
|
console.log("Reconnect stopped");
|
||||||
|
@ -398,11 +398,6 @@ export default function KvmIdRoute() {
|
||||||
setConnectionFailed(false);
|
setConnectionFailed(false);
|
||||||
setLoadingMessage("Connecting to device...");
|
setLoadingMessage("Connecting to device...");
|
||||||
|
|
||||||
if (peerConnection?.signalingState === "stable") {
|
|
||||||
console.log("[setupPeerConnection] Peer connection already established");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let pc: RTCPeerConnection;
|
let pc: RTCPeerConnection;
|
||||||
try {
|
try {
|
||||||
console.log("[setupPeerConnection] Creating peer connection");
|
console.log("[setupPeerConnection] Creating peer connection");
|
||||||
|
@ -499,7 +494,6 @@ export default function KvmIdRoute() {
|
||||||
cleanupAndStopReconnecting,
|
cleanupAndStopReconnecting,
|
||||||
iceConfig?.iceServers,
|
iceConfig?.iceServers,
|
||||||
legacyHTTPSignaling,
|
legacyHTTPSignaling,
|
||||||
peerConnection?.signalingState,
|
|
||||||
sendWebRTCSignal,
|
sendWebRTCSignal,
|
||||||
setDiskChannel,
|
setDiskChannel,
|
||||||
setMediaMediaStream,
|
setMediaMediaStream,
|
||||||
|
|
Loading…
Reference in New Issue