Merge pull request #16884 from drewhk/wip-16505-forwardport-drewhk
=rem #16505: Do not publish AddressTerminated (missing fwd port)
This commit is contained in:
commit
d9db42b757
5 changed files with 211 additions and 64 deletions
|
|
@ -166,6 +166,9 @@ private[remote] object ReliableDeliverySupervisor {
|
|||
case object AttemptSysMsgRedelivery
|
||||
final case class GotUid(uid: Int, remoteAddres: Address)
|
||||
|
||||
case object IsIdle
|
||||
case object Idle
|
||||
|
||||
def props(
|
||||
handleOrActive: Option[AkkaProtocolHandle],
|
||||
localAddress: Address,
|
||||
|
|
@ -272,6 +275,7 @@ private[remote] class ReliableDeliverySupervisor(
|
|||
resendAll()
|
||||
writer ! FlushAndStop
|
||||
context.become(flushWait)
|
||||
case IsIdle ⇒ // Do not reply, we will Terminate soon, or send a GotUid
|
||||
case s: Send ⇒
|
||||
handleSend(s)
|
||||
case ack: Ack ⇒
|
||||
|
|
@ -311,6 +315,7 @@ private[remote] class ReliableDeliverySupervisor(
|
|||
def gated: Receive = {
|
||||
case Terminated(_) ⇒
|
||||
context.system.scheduler.scheduleOnce(settings.RetryGateClosedFor, self, Ungate)
|
||||
case IsIdle ⇒ sender() ! Idle
|
||||
case Ungate ⇒
|
||||
if (resendBuffer.nonAcked.nonEmpty || resendBuffer.nacked.nonEmpty) {
|
||||
// If we talk to a system we have not talked to before (or has given up talking to in the past) stop
|
||||
|
|
@ -335,6 +340,7 @@ private[remote] class ReliableDeliverySupervisor(
|
|||
}
|
||||
|
||||
def idle: Receive = {
|
||||
case IsIdle ⇒ sender() ! Idle
|
||||
case s: Send ⇒
|
||||
writer = createWriter()
|
||||
// Resending will be triggered by the incoming GotUid message after the connection finished
|
||||
|
|
@ -352,6 +358,7 @@ private[remote] class ReliableDeliverySupervisor(
|
|||
}
|
||||
|
||||
def flushWait: Receive = {
|
||||
case IsIdle ⇒ // Do not reply, we will Terminate soon, which will do the inbound connection unstashing
|
||||
case Terminated(_) ⇒
|
||||
// Clear buffer to prevent sending system messages to dead letters -- at this point we are shutting down
|
||||
// and don't really know if they were properly delivered or not.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue