ptupitsyn commented on code in PR #1787:
URL: https://github.com/apache/ignite-3/pull/1787#discussion_r1135707411
##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientHandlerModule.java:
##########
@@ -195,12 +191,16 @@ private ChannelFuture startEndpoint() throws
InterruptedException {
bootstrap.childHandler(new ChannelInitializer<>() {
@Override
protected void initChannel(Channel ch) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("New client connection [remoteAddress="
+ ch.remoteAddress() + ']');
+ }
+
if (configuration.idleTimeout() > 0) {
IdleStateHandler idleStateHandler = new
IdleStateHandler(
configuration.idleTimeout(), 0, 0,
TimeUnit.MILLISECONDS);
ch.pipeline().addLast(idleStateHandler);
- ch.pipeline().addLast(new IdleChannelHandler());
+ ch.pipeline().addLast(new
IdleChannelHandler(configuration.idleTimeout()));
Review Comment:
Nope, `idleTimeout` is now passed only for logging purposes.
`IdleStateHandler` is a built-in Netty class that raises an `IdleStateEvent`
when the channel is idle (see above), and `IdleChannelHandler` is our own class
that handles the event and closes the channel. `IdleChannelHandler` does not
need to know the timeout normally, but I think it is helpful to log it in case
of idle disconnect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]