TURN 服务器: DEBUG

This commit is contained in:
2023-10-01 12:55:42 +08:00
parent 914ae000d5
commit 5ca1ed5f8d
2 changed files with 7 additions and 8 deletions

View File

@ -11,9 +11,9 @@ const turnServer = new turn({
password: 'your-password', password: 'your-password',
}, },
debugLevel: 'ALL', debugLevel: 'ALL',
listeningIps: [''], listeningIps: ['0.0.0.0'],
listeningPort: 3478, listeningPort: 3478,
relayIps: [''], relayIps: ['0.0.0.0'],
relayPort: 3478, relayPort: 3478,
verbose: true verbose: true
}) })

View File

@ -114,13 +114,12 @@ export default class ClientList {
} }
console.log('收到未知数据:', data) console.log('收到未知数据:', data)
} }
websocket.onclose = event => { websocket.onclose = async event => {
console.log('WebSocket 断线重连...') console.log('WebSocket 断线重连...')
setTimeout(() => { await new Promise(resolve => setTimeout(resolve, 10000))
//this.websocket = linkStart() // this.websocket = linkStart()
// 调试模式: 直接刷新页面重载 // 调试模式: 直接刷新页面重载
window.location.reload() window.location.reload()
}, 3000)
} }
return websocket return websocket
} }