X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=netconf%2Fnetconf-netty-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fnettyutil%2FAbstractNetconfSessionNegotiator.java;h=ee98febb6d6a587d4f6fb0690295821fcbabeffc;hb=bebb527a997ac93766c4639c9ee04c2ac7b2995b;hp=9a9225b247f0c53ead8c1000e38d06561e7ccb1d;hpb=1581d8d1ac5205e45409ab48c1034a23d8b8a7ee;p=netconf.git diff --git a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java index 9a9225b247..ee98febb6d 100644 --- a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java +++ b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java @@ -11,14 +11,12 @@ import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.handler.ssl.SslHandler; import io.netty.util.Timeout; import io.netty.util.Timer; -import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.Promise; import java.util.Optional; import java.util.concurrent.TimeUnit; @@ -134,11 +132,11 @@ public abstract class AbstractNetconfSessionNegotiator

) future -> { + channel.close().addListener(future -> { if (future.isSuccess()) { - LOG.debug("Channel {} closed: success", future.channel()); + LOG.debug("Channel {} closed: success", channel); } else { - LOG.warn("Channel {} closed: fail", future.channel()); + LOG.warn("Channel {} closed: fail", channel); } }); }