Hello,
I'm using spray for handling Http connections/closes/responses, etc and I
have this in my receive of my akka
Here i'm spawning a new actor each connection:
def receive = {
case Http.Connected(_, _) => {
sender !
Http.Register(context.actorOf(Props(classOf[ApiServiceWorker])))
}
}
And then I want to get rid of the actor by stopping it once the connection
is closed
def close: Receive = {
case _: Http.ConnectionClosed => {
context.stop(self)
}
}
However, I receive the following. What's the proper way to stop and
terminate an actor?
c0smo [ERROR] [06/22/2014 21:01:56.171]
[c0smo-akka.actor.default-dispatcher-5]
[akka://c0smo/user/IO-UHTTP/listener-0/0] Monitored actor
[Actor[akka://c0smo/user/api/$a#1564612786]] terminated
(akka.actor.DeathPactException)
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.