@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.
@@ -5480,13 +5480,7 @@ function mt_stop(gobj) {
5480
5480
  let priv = gobj.priv;
5481
5481
  clear_timeout(priv.gobj_timer);
5482
5482
  gobj_stop(priv.gobj_timer);
5483
- if (priv.websocket) {
5484
- priv.websocket.onopen = null;
5485
- priv.websocket.onmessage = null;
5486
- priv.websocket.onerror = null;
5487
- priv.websocket.onclose = null;
5488
- close_websocket(gobj);
5489
- }
5483
+ if (priv.websocket) close_websocket(gobj);
5490
5484
  return 0;
5491
5485
  }
5492
5486
  /***************************************************************
@@ -5620,6 +5614,7 @@ function setup_websocket(gobj) {
5620
5614
  }, gobj);
5621
5615
  };
5622
5616
  websocket.onclose = (e) => {
5617
+ if (gobj_is_destroying(gobj)) return;
5623
5618
  if (!gobj_read_bool_attr(gobj_yuno(), "browser_beforeunload")) gobj_send_event(gobj, "EV_ON_CLOSE", {
5624
5619
  url,
5625
5620
  e