akka_30782__fmp_postSop_nvm: flatMapPrefix: postStop: check promise completion before instantiating the abrupt termination exception (#30798)

This commit is contained in:
eyal farago 2021-10-21 14:19:52 +03:00 committed by GitHub
parent 9f88a1b596
commit 0bc96eaa93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,9 @@ import akka.util.OptionVal
override def postStop(): Unit = { override def postStop(): Unit = {
//this covers the case when the nested flow was never materialized //this covers the case when the nested flow was never materialized
matPromise.tryFailure(new AbruptStageTerminationException(this)) if (!matPromise.isCompleted) {
matPromise.failure(new AbruptStageTerminationException(this))
}
super.postStop() super.postStop()
} }