Skip to content

Commit

Permalink
Merge pull request #935 from nightwolfz/fix/stop-children
Browse files Browse the repository at this point in the history
Inverse children stopping order.
  • Loading branch information
rogeralsing authored Nov 21, 2023
2 parents 493e330 + 3d941cb commit 7ecca73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions actor/actor_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,10 @@ func (ctx *actorContext) stopAllChildren() {
return
}

ctx.extras.children.ForEach(func(_ int, pid *PID) {
ctx.Stop(pid)
})
var pids = ctx.extras.children.pids
for i := len(pids) - 1; i >= 0; i-- {
pids[i].sendSystemMessage(ctx.actorSystem, stopMessage)
}
}

func (ctx *actorContext) tryRestartOrTerminate() {
Expand Down

0 comments on commit 7ecca73

Please sign in to comment.