This commit is contained in:
yumoqing 2024-08-30 17:52:40 +08:00
parent 6fa7be2466
commit 350c16c85f

View File

@ -77,7 +77,7 @@ bricks.RTCClient = class extends bricks.VBox {
this.socket = new WebSocket(this.signaling_url);
this.socket.onmessage = this.signaling_message_handle.bind(this);
this.socket.onopen = this.signaling_login.bind(this);
this.socket.onclose = null;
this.socket.onclose = function(){ console.log('888888 this.socket is closed'); };
this.socket.onerror = null;
}
build_head(){
@ -260,6 +260,7 @@ bricks.RTCClient = class extends bricks.VBox {
try {
this.socket.send(s);
} catch (e){
console.log('socket=', this.socket);
this.init_websocket();
this.socket.send(s);
}