=rem #3633 Fix race between EndpointWriter Terminated and TakeOver

This commit is contained in:
Björn Antonsson 2013-11-15 08:59:46 +01:00
parent e104e2a92c
commit 838e8ffbc1
5 changed files with 43 additions and 10 deletions

View file

@ -437,6 +437,7 @@ private[remote] object EndpointWriter {
* @param handle Handle of the new inbound association.
*/
case class TakeOver(handle: AkkaProtocolHandle) extends NoSerializationVerificationNeeded
case class TookOver(writer: ActorRef, handle: AkkaProtocolHandle) extends NoSerializationVerificationNeeded
case object BackoffTimer
case object FlushAndStop
case object AckIdleCheckTimer
@ -641,6 +642,7 @@ private[remote] class EndpointWriter(
// Shutdown old reader
handle foreach { _.disassociate() }
handle = Some(newHandle)
sender ! TookOver(self, newHandle)
goto(Handoff)
case Event(FlushAndStop, _)
stopReason = AssociationHandle.Shutdown