@yuneta/gobj-js 7.8.0 → 7.9.4

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.
@@ -1130,6 +1130,14 @@ function gobj_destroy(gobj) {
1130
1130
  return;
1131
1131
  }
1132
1132
  if (gobj.__refs__ > 0) log_error(`${gobj_short_name(gobj)}: gobj DESTROYING with references: ${gobj.__refs__}`);
1133
+ if (gobj.playing) {
1134
+ log_error(`Destroying a PLAYING gobj: ${gobj_full_name(gobj)}`);
1135
+ gobj_pause(gobj);
1136
+ }
1137
+ if (gobj.running) {
1138
+ log_error(`Destroying a RUNNING gobj: ${gobj_full_name(gobj)}`);
1139
+ gobj_stop(gobj);
1140
+ }
1133
1141
  gobj.obflag |= obflag_t.obflag_destroying;
1134
1142
  let trace_creation = __yuno__ && gobj_read_bool_attr(__yuno__, "trace_creation");
1135
1143
  if (trace_creation) trace_machine(sprintf("💔💔⏩ destroying: %s", gobj_full_name(gobj)));
@@ -1139,14 +1147,6 @@ function gobj_destroy(gobj) {
1139
1147
  parent.gclass.gmt.mt_child_removed(parent, gobj);
1140
1148
  }
1141
1149
  if (gobj.gobj_flag & gobj_flag_t.gobj_flag_service) _deregister_service(gobj);
1142
- if (gobj.playing) {
1143
- log_error(`Destroying a PLAYING gobj: ${gobj_full_name(gobj)}`);
1144
- gobj_pause(gobj);
1145
- }
1146
- if (gobj.running) {
1147
- log_error(`Destroying a RUNNING gobj: ${gobj_full_name(gobj)}`);
1148
- gobj_stop(gobj);
1149
- }
1150
1150
  gobj_unsubscribe_list(gobj, gobj.dl_subscriptions, true);
1151
1151
  gobj_unsubscribe_list(gobj, gobj.dl_subscribings, true);
1152
1152
  if (parent) {
@@ -6062,7 +6062,7 @@ function ac_on_message(gobj, event, kw, src) {
6062
6062
  let msg_type = msg_iev_get_msg_type(gobj, iev_kw);
6063
6063
  let event_id = msg_iev_get_stack(gobj, iev_kw, IEVENT_STACK_ID);
6064
6064
  let iev_dst_role = kw_get_str(gobj, event_id, "dst_role", "");
6065
- if (iev_dst_role !== gobj_yuno_role()) {
6065
+ if (iev_dst_role.toLowerCase() !== gobj_yuno_role().toLowerCase()) {
6066
6066
  log_error(`"It's not my role, dst_role: ${iev_dst_role}, my_role: ${gobj_yuno_role()}`);
6067
6067
  return 0;
6068
6068
  }