fix: always remove child actors regardless of how they exit
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 4m7s
Test / build (map[name:stable]) (push) Successful in 4m30s
Release Please / Release-plz (push) Failing after 37s

This commit is contained in:
Paul Campbell 2024-12-22 21:13:22 +00:00
parent 0023e2aa70
commit 5abaf3038f
3 changed files with 15 additions and 18 deletions

View file

@ -129,8 +129,6 @@ impl Actor for ImportCardActor {
}); });
on_actor_link_died!(this, actor_ref, id, reason, { on_actor_link_died!(this, actor_ref, id, reason, {
match reason {
ActorStopReason::Normal => {
let label = this.labels_children.remove(&id); let label = this.labels_children.remove(&id);
let attachment = this.attachments_children.remove(&id); let attachment = this.attachments_children.remove(&id);
tracing::debug!( tracing::debug!(
@ -139,7 +137,8 @@ impl Actor for ImportCardActor {
?attachment, ?attachment,
"card (label|attachment) child stopped" "card (label|attachment) child stopped"
); );
} match reason {
ActorStopReason::Normal => {}
_ => { _ => {
return Ok(Some(reason)); return Ok(Some(reason));
} }

View file

@ -85,11 +85,10 @@ impl Actor for ImportStackActor {
}); });
on_actor_link_died!(this, actor_ref, id, reason, { on_actor_link_died!(this, actor_ref, id, reason, {
match reason {
ActorStopReason::Normal => {
let stopped = this.children.remove(&id); let stopped = this.children.remove(&id);
tracing::debug!(?id, ?stopped, "stack card child stopped"); tracing::debug!(?id, ?stopped, "stack card child stopped");
} match reason {
ActorStopReason::Normal => {}
_ => { _ => {
return Ok(Some(reason)); return Ok(Some(reason));
} }

View file

@ -139,11 +139,10 @@ impl Actor for ImportStacksActor {
}); });
on_actor_link_died!(this, actor_ref, id, reason, { on_actor_link_died!(this, actor_ref, id, reason, {
match reason {
ActorStopReason::Normal => {
let stopped = this.children.remove(&id); let stopped = this.children.remove(&id);
tracing::debug!(?id, ?stopped, "stacks stack child stopped"); tracing::debug!(?id, ?stopped, "stacks stack child stopped");
} match reason {
ActorStopReason::Normal => {}
_ => { _ => {
return Ok(Some(reason)); return Ok(Some(reason));
} }