When RARP is being shutdown, it pipes result of the shutdown of transport to self.
remote's shutdown is using `ask` pattern, so it can produce `Status.Failure`, which is not handled in RARP's state `WaitTransportShutdown`. For fixing it added matching for `Status.Failure` and changed `RemoteTransport`'s shutdown signature to use `akka.Done`, which looks more consistent with other shutdown's and `akka.Done` is more verbose than previously used `Unit`.
This commit is contained in:
parent
1c40d64d62
commit
9503c1f588
3 changed files with 13 additions and 5 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
package akka.remote
|
||||
|
||||
import akka.Done
|
||||
import akka.actor._
|
||||
import akka.dispatch.sysmsg._
|
||||
import akka.event.{ Logging, LoggingAdapter, EventStream }
|
||||
|
|
@ -59,10 +60,15 @@ private[akka] object RemoteActorRefProvider {
|
|||
}
|
||||
|
||||
when(WaitTransportShutdown) {
|
||||
case Event((), _) ⇒
|
||||
case Event(Done, _) ⇒
|
||||
log.info("Remoting shut down.")
|
||||
systemGuardian ! TerminationHookDone
|
||||
stop()
|
||||
|
||||
case Event(Status.Failure(ex), _) ⇒
|
||||
log.error(ex, "Remoting shut down with error")
|
||||
systemGuardian ! TerminationHookDone
|
||||
stop()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue