Skip to content

Commit

Permalink
fix: OF-2559 - rename clientConnection boolean as isClientConnection …
Browse files Browse the repository at this point in the history
…for clarity.
  • Loading branch information
AlexGidman committed Jul 21, 2023
1 parent cac4963 commit b3afb6f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public NettyServerInitializer(NettyConnectionHandler businessLogicHandler, boole

@Override
public void initChannel(SocketChannel ch) throws Exception {
boolean clientConnection = businessLogicHandler instanceof NettyClientConnectionHandler;
boolean isClientConnection = businessLogicHandler instanceof NettyClientConnectionHandler;
int maxIdleTimeBeforeClosing = businessLogicHandler.getMaxIdleTime() > -1 ? businessLogicHandler.getMaxIdleTime() : 0;
int maxIdleTimeBeforePinging = maxIdleTimeBeforeClosing / 2;

Expand All @@ -54,7 +54,7 @@ public void initChannel(SocketChannel ch) throws Exception {
.addLast(new StringEncoder())
.addLast("stalledSessionHandler", new WriteTimeoutHandler(Math.toIntExact(WRITE_TIMEOUT_SECONDS.getValue().getSeconds())))
.addLast("idleStateHandler", new IdleStateHandler(maxIdleTimeBeforeClosing, maxIdleTimeBeforePinging, 0))
.addLast("keepAliveHandler", new NettyIdleStateKeepAliveHandler(clientConnection))
.addLast("keepAliveHandler", new NettyIdleStateKeepAliveHandler(isClientConnection))
.addLast(businessLogicHandler);

if (directTLS) {
Expand Down

0 comments on commit b3afb6f

Please sign in to comment.