Skip to content

Commit

Permalink
back to traverse
Browse files Browse the repository at this point in the history
  • Loading branch information
hamnis committed Feb 4, 2023
1 parent 361b0ca commit 21756fd
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,7 @@ private[client] class Http4sWebsocketHandler[F[_]](

override def sendMany[G[_], A <: WSFrame](wsfs: G[A])(implicit G: Foldable[G]): F[Unit] =
if (ctx.channel().isActive) {
runInNetty(F.delay {
if (ctx.channel().isActive) {
val list = wsfs.toList
list.foreach(wsf => ctx.write(fromWSFrame(wsf)))
ctx.flush()
}
()
})
wsfs.traverse_(wsf => runInNetty(F.delay(ctx.writeAndFlush(fromWSFrame(wsf))).liftToF))
} else {
closed.complete(()).void
}
Expand Down

0 comments on commit 21756fd

Please sign in to comment.