fix: always remove child actors regardless of how they exit
This commit is contained in:
parent
0023e2aa70
commit
5abaf3038f
3 changed files with 15 additions and 18 deletions
|
@ -129,17 +129,16 @@ impl Actor for ImportCardActor {
|
||||||
});
|
});
|
||||||
|
|
||||||
on_actor_link_died!(this, actor_ref, id, reason, {
|
on_actor_link_died!(this, actor_ref, id, reason, {
|
||||||
|
let label = this.labels_children.remove(&id);
|
||||||
|
let attachment = this.attachments_children.remove(&id);
|
||||||
|
tracing::debug!(
|
||||||
|
?id,
|
||||||
|
?label,
|
||||||
|
?attachment,
|
||||||
|
"card (label|attachment) child stopped"
|
||||||
|
);
|
||||||
match reason {
|
match reason {
|
||||||
ActorStopReason::Normal => {
|
ActorStopReason::Normal => {}
|
||||||
let label = this.labels_children.remove(&id);
|
|
||||||
let attachment = this.attachments_children.remove(&id);
|
|
||||||
tracing::debug!(
|
|
||||||
?id,
|
|
||||||
?label,
|
|
||||||
?attachment,
|
|
||||||
"card (label|attachment) child stopped"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
_ => {
|
_ => {
|
||||||
return Ok(Some(reason));
|
return Ok(Some(reason));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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, {
|
||||||
|
let stopped = this.children.remove(&id);
|
||||||
|
tracing::debug!(?id, ?stopped, "stack card child stopped");
|
||||||
match reason {
|
match reason {
|
||||||
ActorStopReason::Normal => {
|
ActorStopReason::Normal => {}
|
||||||
let stopped = this.children.remove(&id);
|
|
||||||
tracing::debug!(?id, ?stopped, "stack card child stopped");
|
|
||||||
}
|
|
||||||
_ => {
|
_ => {
|
||||||
return Ok(Some(reason));
|
return Ok(Some(reason));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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, {
|
||||||
|
let stopped = this.children.remove(&id);
|
||||||
|
tracing::debug!(?id, ?stopped, "stacks stack child stopped");
|
||||||
match reason {
|
match reason {
|
||||||
ActorStopReason::Normal => {
|
ActorStopReason::Normal => {}
|
||||||
let stopped = this.children.remove(&id);
|
|
||||||
tracing::debug!(?id, ?stopped, "stacks stack child stopped");
|
|
||||||
}
|
|
||||||
_ => {
|
_ => {
|
||||||
return Ok(Some(reason));
|
return Ok(Some(reason));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue