@yuneta/gobj-js 7.6.6 → 7.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5481,13 +5481,7 @@ function mt_stop(gobj) {
5481
5481
  let priv = gobj.priv;
5482
5482
  clear_timeout(priv.gobj_timer);
5483
5483
  gobj_stop(priv.gobj_timer);
5484
- if (priv.websocket) {
5485
- priv.websocket.onopen = null;
5486
- priv.websocket.onmessage = null;
5487
- priv.websocket.onerror = null;
5488
- priv.websocket.onclose = null;
5489
- close_websocket(gobj);
5490
- }
5484
+ if (priv.websocket) close_websocket(gobj);
5491
5485
  return 0;
5492
5486
  }
5493
5487
  /***************************************************************
@@ -5621,6 +5615,7 @@ function setup_websocket(gobj) {
5621
5615
  }, gobj);
5622
5616
  };
5623
5617
  websocket.onclose = (e) => {
5618
+ if (gobj_is_destroying(gobj)) return;
5624
5619
  if (!gobj_read_bool_attr(gobj_yuno(), "browser_beforeunload")) gobj_send_event(gobj, "EV_ON_CLOSE", {
5625
5620
  url,
5626
5621
  e