@Override
public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
log.info("Pcc disconnected callback for pc:{}. Cleaning up ...", getClientInfoString());
if (thispccId != null) {
if (!duplicatePccIdFound) {
// if the disconnected client (on this ChannelHandler)
// was not one with a duplicate-dpid, it is safe to remove all
// state for it at the controller. Notice that if the disconnected
// client was a duplicate-ip, calling the method below would clear
// all state for the original client (with the same ip),
// which we obviously don't want.
log.debug("{}:removal called", getClientInfoString());
if (pc != null) {
pc.removeConnectedClient();
}
} else {
// A duplicate was disconnected on this ChannelHandler,
// this is the same client reconnecting, but the original state was
// not cleaned up - XXX check liveness of original ChannelHandler
log.debug("{}:duplicate found", getClientInfoString());
duplicatePccIdFound = Boolean.FALSE;
}
} else {
log.warn("no pccip in channelHandler registered for " + "disconnected client {}", getClientInfoString());
}
}
PcepChannelHandler.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:athena
作者:
评论列表
文章目录