=str #17453: Fix substream RS compliance, awaitAllStagesStopped and Fanin leak

This commit is contained in:
Endre Sándor Varga 2015-05-14 12:21:47 +02:00
parent 6d08cd48c6
commit 8a7f6a357d
7 changed files with 40 additions and 15 deletions

View file

@ -82,9 +82,11 @@ private[akka] object MultiStreamOutputProcessor {
private def closePublisher(withState: CompletedState): Unit = {
subscriptionTimeout.cancel()
state.getAndSet(withState) match {
case Attached(sub) closeSubscriber(sub, withState)
case _: CompletedState throw new IllegalStateException("Attempted to double shutdown publisher")
case Open // No action needed
case Attached(sub)
if (subscriber eq null) tryOnSubscribe(sub, CancelledSubscription)
closeSubscriber(sub, withState)
case Open // No action needed
}
}