移除错误消息
This commit is contained in:
		@@ -95,18 +95,18 @@ export default class ClientList {
 | 
				
			|||||||
                                option.onmessage(event, client)
 | 
					                                option.onmessage(event, client)
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        channel.onclose = event => {
 | 
					                        //channel.onclose = event => {
 | 
				
			||||||
                            console.debug('对方关闭', channel.label, '数据通道')
 | 
					                        //    console.debug('对方关闭', channel.label, '数据通道')
 | 
				
			||||||
                            if (option && option.onclose) {
 | 
					                        //    if (option && option.onclose) {
 | 
				
			||||||
                                option.onclose(event, client)
 | 
					                        //        option.onclose(event, client)
 | 
				
			||||||
                            }
 | 
					                        //    }
 | 
				
			||||||
                        }
 | 
					                        //}
 | 
				
			||||||
                        channel.onerror = event => {
 | 
					                        //channel.onerror = event => {
 | 
				
			||||||
                            console.error(data.name, '通道', channel.label, '发生错误')
 | 
					                        //    console.error(data.name, '通道', channel.label, '发生错误')
 | 
				
			||||||
                            if (option && option.onerror) {
 | 
					                        //    if (option && option.onerror) {
 | 
				
			||||||
                                option.onerror(event, client)
 | 
					                        //        option.onerror(event, client)
 | 
				
			||||||
                            }
 | 
					                        //    }
 | 
				
			||||||
                        }
 | 
					                        //}
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    webrtc.onicecandidate = event => {
 | 
					                    webrtc.onicecandidate = event => {
 | 
				
			||||||
                        if (event.candidate) {
 | 
					                        if (event.candidate) {
 | 
				
			||||||
@@ -136,6 +136,11 @@ export default class ClientList {
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        return dc
 | 
					                        return dc
 | 
				
			||||||
                    })
 | 
					                    })
 | 
				
			||||||
 | 
					                    //// 页面刷新前主动关闭所有数据通道并关闭 WebRTC 连接
 | 
				
			||||||
 | 
					                    //window.addEventListener('beforeunload', event => {
 | 
				
			||||||
 | 
					                    //    channels.forEach(ch => ch.close())
 | 
				
			||||||
 | 
					                    //    webrtc.close()
 | 
				
			||||||
 | 
					                    //})
 | 
				
			||||||
                    return { webrtc, channels }
 | 
					                    return { webrtc, channels }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (data.type === 'list') {
 | 
					                if (data.type === 'list') {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user