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,8 +129,6 @@ impl Actor for ImportCardActor {
|
|||
});
|
||||
|
||||
on_actor_link_died!(this, actor_ref, id, reason, {
|
||||
match reason {
|
||||
ActorStopReason::Normal => {
|
||||
let label = this.labels_children.remove(&id);
|
||||
let attachment = this.attachments_children.remove(&id);
|
||||
tracing::debug!(
|
||||
|
@ -139,7 +137,8 @@ impl Actor for ImportCardActor {
|
|||
?attachment,
|
||||
"card (label|attachment) child stopped"
|
||||
);
|
||||
}
|
||||
match reason {
|
||||
ActorStopReason::Normal => {}
|
||||
_ => {
|
||||
return Ok(Some(reason));
|
||||
}
|
||||
|
|
|
@ -85,11 +85,10 @@ impl Actor for ImportStackActor {
|
|||
});
|
||||
|
||||
on_actor_link_died!(this, actor_ref, id, reason, {
|
||||
match reason {
|
||||
ActorStopReason::Normal => {
|
||||
let stopped = this.children.remove(&id);
|
||||
tracing::debug!(?id, ?stopped, "stack card child stopped");
|
||||
}
|
||||
match reason {
|
||||
ActorStopReason::Normal => {}
|
||||
_ => {
|
||||
return Ok(Some(reason));
|
||||
}
|
||||
|
|
|
@ -139,11 +139,10 @@ impl Actor for ImportStacksActor {
|
|||
});
|
||||
|
||||
on_actor_link_died!(this, actor_ref, id, reason, {
|
||||
match reason {
|
||||
ActorStopReason::Normal => {
|
||||
let stopped = this.children.remove(&id);
|
||||
tracing::debug!(?id, ?stopped, "stacks stack child stopped");
|
||||
}
|
||||
match reason {
|
||||
ActorStopReason::Normal => {}
|
||||
_ => {
|
||||
return Ok(Some(reason));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue