Skip to content

Commit

Permalink
=htc delayCancellation should also apply for Http().serverLayer
Browse files Browse the repository at this point in the history
Before it was only applied for all the other server APIs.
  • Loading branch information
jrudolph committed Jan 29, 2018
1 parent 829181e commit 58e493b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions akka-http-core/src/main/scala/akka/http/scaladsl/Http.scala
Expand Up @@ -74,8 +74,8 @@ class HttpExt(private val config: Config)(implicit val system: ActorSystem) exte

val serverBidiFlow =
settings.idleTimeout match {
case t: FiniteDuration httpLayer atop delayCancellationStage(settings) atop tlsStage atop HttpConnectionIdleTimeoutBidi(t, None)
case _ httpLayer atop delayCancellationStage(settings) atop tlsStage
case t: FiniteDuration httpLayer atop tlsStage atop HttpConnectionIdleTimeoutBidi(t, None)
case _ httpLayer atop tlsStage
}

serverBidiFlow
Expand Down Expand Up @@ -289,7 +289,9 @@ class HttpExt(private val config: Config)(implicit val system: ActorSystem) exte
remoteAddress: Option[InetSocketAddress] = None,
log: LoggingAdapter = system.log,
isSecureConnection: Boolean = false): ServerLayer =
HttpServerBluePrint(settings, log, isSecureConnection).addAttributes(HttpAttributes.remoteAddress(remoteAddress))
HttpServerBluePrint(settings, log, isSecureConnection)
.addAttributes(HttpAttributes.remoteAddress(remoteAddress))
.atop(delayCancellationStage(settings))

@deprecated("Binary compatibility method. Use the new `serverLayer` method without the implicit materializer instead.", "10.0.11")
private[http] def serverLayer()(implicit mat: Materializer): ServerLayer =
Expand Down

0 comments on commit 58e493b

Please sign in to comment.