Connect to mediasoup with timeout(fix when it appears offline)
This commit is contained in:
parent
39ad9cad27
commit
b621b76e37
@ -37,6 +37,7 @@ const connectToMediasoup = () => {
|
||||
}
|
||||
|
||||
if (IS_PRODUCER === true) {
|
||||
setTimeout(() => {
|
||||
hub.on('connect', async () => {
|
||||
console.log(`[HUB] ${config.hubAddress} | connected: ${hub.connected}`)
|
||||
connectToMediasoup()
|
||||
@ -70,6 +71,7 @@ if (IS_PRODUCER === true) {
|
||||
}
|
||||
})
|
||||
})
|
||||
}, 2000);
|
||||
|
||||
hub.on('connect_error', (error) => {
|
||||
console.log('connect_error', error);
|
||||
|
Loading…
Reference in New Issue
Block a user