Compare commits

..

No commits in common. "dff8922a0868a4ca11a7dab3bec8a67980c8d396" and "48314a0bd1a6935b6eefea8b5aea7f49a4c1029a" have entirely different histories.

3 changed files with 3 additions and 16 deletions

View File

@ -32,7 +32,6 @@ bricks.Signaling = class {
this.handlers = {};
this.sessionhandlers = {};
this.init_websocket();
this.hb_task = null;
}
init_websocket(){
@ -44,13 +43,6 @@ bricks.Signaling = class {
}
reconnect(){
console.log('eror happened');
if (this.hb_task){
this.hb_task.cancel();
this.hb_task = null;
}
if (this.onclose){
this.onclose();
}
return;
try {
this.socket.close();
@ -130,9 +122,6 @@ bricks.Signaling = class {
type:'login',
}
this.send_data(d);
if (this.heartbeat_period){
this.hb_task = schedule_once(this.login.bind(this), this.heartbeat_period);
}
}
logout(){

View File

@ -108,16 +108,15 @@ var schedule_once = function(f, t){
t:time in second unit
*/
t = t * 1000
return window.setTimeout(f, t);
window.setTimeout(f, t);
}
var schedule_interval = function(f, t){
var mf = function(func, t){
console.log('arguments:', func, t);
func();
schedule_once(mf.bind(func, t), t);
schedule_once(f, t);
}
return schedule_once(mf.bind(f,t), t);
schedule_once(mf.bind(f,t), t);
}
var debug = function(){

View File

@ -41,7 +41,6 @@ bricks.Video = class extends bricks.Layout {
this.hidedbtn.hide();
this.add_widget(this.hidedbtn);
}
destroy_resource(params, event){
var w = event.target.bricks_widget;
if (! w.parent){