X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fcommons%2Fprotocol-framework%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fframework%2FAbstractProtocolSession.java;h=44afc4e7a1f18c52b61916a8e3948343122956c1;hp=47e96d1ff490df392accfb84dc10d55eb84a4583;hb=e3998d55e33da9f6ecb69da75ecc71a047b6362b;hpb=de33c45a107bbaa3c1bbc160bc8dc6485ac9802e diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractProtocolSession.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractProtocolSession.java index 47e96d1ff4..44afc4e7a1 100644 --- a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractProtocolSession.java +++ b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractProtocolSession.java @@ -13,6 +13,7 @@ import io.netty.channel.SimpleChannelInboundHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Deprecated public abstract class AbstractProtocolSession extends SimpleChannelInboundHandler implements ProtocolSession { private static final Logger LOG = LoggerFactory.getLogger(AbstractProtocolSession.class); @@ -37,6 +38,12 @@ public abstract class AbstractProtocolSession extends SimpleChannelInboundHan public final void channelInactive(final ChannelHandlerContext ctx) { LOG.debug("Channel {} inactive.", ctx.channel()); endOfInput(); + try { + // Forward channel inactive event, all handlers in pipeline might be interested in the event e.g. close channel handler of reconnect promise + super.channelInactive(ctx); + } catch (final Exception e) { + throw new RuntimeException("Failed to delegate channel inactive event on channel " + ctx.channel(), e); + } } @Override