@yuneta/gobj-js 7.6.5 → 7.6.6

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.
@@ -2002,9 +2002,9 @@
2002
2002
  *
2003
2003
  ***************************************************************************/
2004
2004
  function gobj_current_state(gobj) {
2005
- if (gobj_is_destroying(gobj)) {
2006
- log_error("gobj NULL or DESTROYED");
2007
- return null;
2005
+ if (!is_gobj(gobj)) {
2006
+ log_error("hgobj NULL");
2007
+ return "";
2008
2008
  }
2009
2009
  return gobj.current_state.state_name;
2010
2010
  }
@@ -5484,7 +5484,13 @@
5484
5484
  let priv = gobj.priv;
5485
5485
  clear_timeout(priv.gobj_timer);
5486
5486
  gobj_stop(priv.gobj_timer);
5487
- if (priv.websocket) close_websocket(gobj);
5487
+ if (priv.websocket) {
5488
+ priv.websocket.onopen = null;
5489
+ priv.websocket.onmessage = null;
5490
+ priv.websocket.onerror = null;
5491
+ priv.websocket.onclose = null;
5492
+ close_websocket(gobj);
5493
+ }
5488
5494
  return 0;
5489
5495
  }
5490
5496
  /***************************************************************