Merge pull request #28098 from johanandren/wip-TypedSample-fix
Watch in the wrong place in sample
This commit is contained in:
commit
5a309cc3d8
1 changed files with 1 additions and 1 deletions
|
|
@ -49,10 +49,10 @@ object TypedSample {
|
|||
children.get(name) match {
|
||||
case Some(ref) =>
|
||||
ref ! childCommand
|
||||
context.watchWith(ref, ChildTerminated(name))
|
||||
Behaviors.same
|
||||
case None =>
|
||||
val ref = context.spawn(Child(), name)
|
||||
context.watchWith(ref, ChildTerminated(name))
|
||||
ref ! childCommand
|
||||
updated(children + (name -> ref))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue