Skip to content

Commit

Permalink
Update http4s-blaze-client, ... to 0.21.17 (#443)
Browse files Browse the repository at this point in the history
* Update http4s-blaze-client, ... to 0.21.17

* fix!: Remove nio2 configuration after http4s blaze upgrade

feat: Add configuration for maxConnections

BREAKING CHANGE: nio2 is no longer available for blaze server

* chore: Update http4s version

* Revert "chore: Update http4s version"

This reverts commit b26f0f88π

Co-authored-by: Janecek Jakub <[email protected]>
  • Loading branch information
scala-steward and jakubjanecek authored Feb 3, 2021
1 parent 971cd74 commit 5213814
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import scala.concurrent.duration.{Duration, FiniteDuration}
final case class Http4sBlazeServerConfig(
listenAddress: String,
listenPort: Int,
nio2Enabled: Boolean = true,
webSocketsEnabled: Boolean = false,
http2Enabled: Boolean = false,
responseHeaderTimeout: FiniteDuration = Duration(defaults.ResponseTimeout.toNanos, TimeUnit.NANOSECONDS),
idleTimeout: FiniteDuration = Duration(defaults.IdleTimeout.toNanos, TimeUnit.NANOSECONDS),
bufferSize: Int = 64 * 1024,
maxRequestLineLength: Int = 4 * 1024,
maxHeadersLength: Int = 40 * 1024,
maxHeadersLength: Int = defaults.MaxHeadersSize,
chunkBufferMaxSize: Int = 1024 * 1024,
connectorPoolSize: Int = channel.DefaultPoolSize,
maxConnections: Int = defaults.MaxConnections,
socketOptions: SocketOptions = SocketOptions()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ object Http4sBlazeServerModule {
.bindSocketAddress(inetSocketAddress)
.withHttpApp(httpApp)
.withoutBanner
.withNio2(config.nio2Enabled)
.withWebSockets(config.webSocketsEnabled)
.enableHttp2(config.http2Enabled)
.withResponseHeaderTimeout(Duration.fromNanos(config.responseHeaderTimeout.toNanos))
Expand All @@ -41,6 +40,7 @@ object Http4sBlazeServerModule {
.withMaxHeadersLength(config.maxHeadersLength)
.withChunkBufferMaxSize(config.chunkBufferMaxSize)
.withConnectorPoolSize(config.connectorPoolSize)
.withMaxConnections(config.maxConnections)
.withChannelOption[java.lang.Boolean](StandardSocketOptions.TCP_NODELAY, config.socketOptions.tcpNoDelay)
.resource
} yield server
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Dependencies {
val datastaxJavaDriverCore = "4.10.0"
val doobie = "0.10.0"
val grpc = "1.35.0"
val http4s = "0.21.16"
val http4s = "0.21.17"
val micrometerCore = "1.6.3"
val micrometerJmx = "1.6.3"
val micrometerStatsD = "1.6.3"
Expand Down

0 comments on commit 5213814

Please sign in to comment.