Add 1 second timeout to reconnect

This commit is contained in:
Yohann D'ANELLO 2020-09-29 14:23:34 +02:00
parent c67a4adf83
commit 85febcf757
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ startPeerConnection = () => {
console.log("Connection failed, restarting...") console.log("Connection failed, restarting...")
peerConnection.close() peerConnection.close()
peerConnection = null peerConnection = null
startPeerConnection() setTimeout(startPeerConnection, 1000)
break break
default: default:
console.log(peerConnection.iceConnectionState) console.log(peerConnection.iceConnectionState)