Skip to content

Commit

Permalink
Re-enable websocket-aggragator and move timeout to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
hamnis committed Feb 4, 2023
1 parent 21756fd commit d5fd629
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,14 @@ class NettyWSClientBuilder[F[_]](
pipeline.addLast("http", new HttpClientCodec())
pipeline.addLast("http-aggregate", new HttpObjectAggregator(8192))
pipeline.addLast("protocol-handler", websocketinit)
/*pipeline.addLast(
"aggregate2",
new WebSocketFrameAggregator(config.maxFramePayloadLength()))*/
pipeline.addLast(
"websocket-aggregate",
new WebSocketFrameAggregator(config.maxFramePayloadLength()))
if (idleTimeout.isFinite && idleTimeout.length > 0)
pipeline
.addLast(
"timeout",
new IdleStateHandler(0, 0, idleTimeout.length, idleTimeout.unit))
pipeline.addLast(
"websocket",
new Http4sWebsocketHandler[F](
Expand All @@ -197,11 +202,6 @@ class NettyWSClientBuilder[F[_]](
dispatcher,
callback)
)
if (idleTimeout.isFinite && idleTimeout.length > 0)
pipeline
.addLast(
"timeout",
new IdleStateHandler(0, 0, idleTimeout.length, idleTimeout.unit))
}
})
F.delay(bs.connect(socketAddress).sync()).as(None)
Expand Down

0 comments on commit d5fd629

Please sign in to comment.