=doc Fix how to access deadLetters from system in actor (#20665)
When a developer copy `system.deadLetters` from documentation, it does not work in Actor and system must get from context.
This commit is contained in:
parent
6a13d99bfc
commit
6b08767137
1 changed files with 1 additions and 1 deletions
|
|
@ -478,7 +478,7 @@ class ActorDocSpec extends AkkaSpec("""
|
||||||
class WatchActor extends Actor {
|
class WatchActor extends Actor {
|
||||||
val child = context.actorOf(Props.empty, "child")
|
val child = context.actorOf(Props.empty, "child")
|
||||||
context.watch(child) // <-- this is the only call needed for registration
|
context.watch(child) // <-- this is the only call needed for registration
|
||||||
var lastSender = system.deadLetters
|
var lastSender = context.system.deadLetters
|
||||||
|
|
||||||
def receive = {
|
def receive = {
|
||||||
case "kill" =>
|
case "kill" =>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue