+str fix for "fail offer future when stream is completed" QueueSource/SinkSpec

This commit is contained in:
Alexander Golubev 2017-08-10 20:20:55 -04:00
parent bb106aa27e
commit eff6c409d1
6 changed files with 24 additions and 6 deletions

View file

@ -7,9 +7,9 @@ import akka.stream.OverflowStrategies._
import akka.stream._
import akka.stream.stage._
import akka.stream.scaladsl.SourceQueueWithComplete
import akka.Done
import java.util.concurrent.CompletionStage
import akka.annotation.InternalApi
import scala.concurrent.{ Future, Promise }
@ -46,7 +46,7 @@ import scala.compat.java8.FutureConverters._
initCallback(callback.invoke)
}
override def postStop(): Unit = {
val exception = new AbruptStageTerminationException(this)
val exception = new StreamDetachedException()
completion.tryFailure(exception)
stopCallback {
case Offer(elem, promise) promise.failure(exception)