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
|
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
package akka.remote
|
||||
|
||||
import akka.Done
|
||||
import akka.actor.SupervisorStrategy._
|
||||
import akka.actor._
|
||||
import akka.event.{ Logging, LoggingAdapter }
|
||||
|
|
@ -135,7 +136,7 @@ private[remote] class Remoting(_system: ExtendedActorSystem, _provider: RemoteAc
|
|||
private def notifyError(msg: String, cause: Throwable): Unit =
|
||||
eventPublisher.notifyListeners(RemotingErrorEvent(new RemoteTransportException(msg, cause)))
|
||||
|
||||
override def shutdown(): Future[Unit] = {
|
||||
override def shutdown(): Future[Done] = {
|
||||
endpointManager match {
|
||||
case Some(manager) ⇒
|
||||
implicit val timeout = ShutdownTimeout
|
||||
|
|
@ -156,10 +157,10 @@ private[remote] class Remoting(_system: ExtendedActorSystem, _provider: RemoteAc
|
|||
case Failure(e) ⇒
|
||||
notifyError("Failure during shutdown of remoting.", e)
|
||||
finalize()
|
||||
} map { _ ⇒ () } // RARP needs only type Unit, not a boolean
|
||||
} map { _ ⇒ Done } // RARP needs only akka.Done, not a boolean
|
||||
case None ⇒
|
||||
log.warning("Remoting is not running. Ignoring shutdown attempt.")
|
||||
Future successful (())
|
||||
Future successful Done
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue