From a2329e7c8ed1a245bcc96530a24c7585dec64de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Andr=C3=A9n?= Date: Thu, 31 Oct 2019 10:28:16 +0100 Subject: [PATCH] Watch in the wrong place --- .../test/scala/docs/akka/typed/fromclassic/TypedSample.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-actor-typed-tests/src/test/scala/docs/akka/typed/fromclassic/TypedSample.scala b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/fromclassic/TypedSample.scala index 961da8d24c..7c28de2425 100644 --- a/akka-actor-typed-tests/src/test/scala/docs/akka/typed/fromclassic/TypedSample.scala +++ b/akka-actor-typed-tests/src/test/scala/docs/akka/typed/fromclassic/TypedSample.scala @@ -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)) }