@Override public void channelInactive(final ChannelHandlerContext ctx) throws Exception { // This is the ultimate channel inactive handler, not forwarding if (promise.isCancelled()) { return; } if (promise.isInitialConnectFinished() == false) { LOG.debug("Connection to {} was dropped during negotiation, reattempting", promise.address); } LOG.debug("Reconnecting after connection to {} was dropped", promise.address); promise.connect(); } }