Skip to content

Commit

Permalink
Scala tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Feb 22, 2024
1 parent a606d0b commit e9e620e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/netty/FrameHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final private class FrameHandler(using Executor) extends SimpleChannelInboundHan
if frame.content().readableBytes() >= 8 then
val lagMillis = (System.currentTimeMillis() - frame.content().getLong(0)).toInt
val pong = ClientOut.RoundPongFrame(lagMillis)
Option(ctx.channel.attr(key.client).get) foreach { _.value foreach { _ foreach (_ ! pong) } }
Option(ctx.channel.attr(key.client).get).foreach(_.value.foreach(_.foreach(_ ! pong)))

case frame =>
logger.info("unsupported frame type: " + frame.getClass.getName)
Expand Down

0 comments on commit e9e620e

Please sign in to comment.