akka-stream compiler warnings as fatal errors (#26673)
This commit is contained in:
parent
6207484c0e
commit
7e7901ad49
53 changed files with 276 additions and 183 deletions
|
|
@ -107,11 +107,12 @@ import scala.util.control.NonFatal
|
|||
|
||||
private def createResource(): Unit = {
|
||||
create().onComplete { resource =>
|
||||
createdCallback(resource).recover {
|
||||
createdCallback(resource).failed.foreach {
|
||||
case _: StreamDetachedException =>
|
||||
// stream stopped
|
||||
resource match {
|
||||
case Success(r) => close(r)
|
||||
case Success(r) =>
|
||||
close(r)
|
||||
case Failure(ex) => throw ex // failed to open but stream is stopped already
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue