bugfix
This commit is contained in:
parent
f2135c579f
commit
dd199f0bc0
@ -38,10 +38,12 @@ bricks.Signaling = class {
|
|||||||
this.socket = new WebSocket(this.signaling_url);
|
this.socket = new WebSocket(this.signaling_url);
|
||||||
this.socket.onmessage = this.signaling_recvdata.bind(this);
|
this.socket.onmessage = this.signaling_recvdata.bind(this);
|
||||||
this.socket.onopen = this.login.bind(this);
|
this.socket.onopen = this.login.bind(this);
|
||||||
this.socket.onclose = function(){
|
this.socket.onclose = this.init_websocket.bind(this);
|
||||||
this.init_websockset();
|
this.init_websockset();
|
||||||
};
|
};
|
||||||
this.socket.onerror = function(){
|
this.socket.onerror = this.reconnect.bind(this);
|
||||||
|
}
|
||||||
|
reconnect(){
|
||||||
try {
|
try {
|
||||||
this.socket.close();
|
this.socket.close();
|
||||||
} catch(e){
|
} catch(e){
|
||||||
|
Loading…
Reference in New Issue
Block a user