This commit is contained in:
yumoqing 2025-09-12 12:19:06 +08:00
parent 440ad15e0c
commit 62cf2c2bff

View File

@ -19,9 +19,13 @@ bricks.Wterm = class extends bricks.JsWidget {
} }
destroy(){ destroy(){
console.debug('------domoff event, destory this widget'); console.debug('------domoff event, destory this widget');
try {
this.unbind('element_resize', this.term_resize.bind(this)) this.unbind('element_resize', this.term_resize.bind(this))
this.heartbeat_task.cancel(); this.heartbeat_task.cancel();
this.heartbeat_task = null; this.heartbeat_task = null;
} catch(e) {
console.log('error ', e);
}
console.debug('---1--domoff event, destory this widget'); console.debug('---1--domoff event, destory this widget');
if (this.socket){ if (this.socket){
console.log('socket alive, destroy it'); console.log('socket alive, destroy it');