Removed unuseful sessionStolen attribute from channel
This commit is contained in:
@@ -90,14 +90,7 @@ public class NettyMQTTHandler extends ChannelInboundHandlerAdapter {
|
||||
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
|
||||
String clientID = NettyUtils.clientID(ctx.channel());
|
||||
if (clientID != null && !clientID.isEmpty()) {
|
||||
//if the channel was of a correctly connected client, inform messaging
|
||||
//else it was of a not completed CONNECT message or sessionStolen
|
||||
boolean stolen = false;
|
||||
Boolean stolenAttr = NettyUtils.sessionStolen(ctx.channel());
|
||||
if (stolenAttr != null && stolenAttr == Boolean.TRUE) {
|
||||
stolen = true;
|
||||
}
|
||||
m_processor.processConnectionLost(clientID, stolen, ctx.channel());
|
||||
m_processor.processConnectionLost(clientID, ctx.channel());
|
||||
}
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class NettyUtils {
|
||||
return (String) channel.attr(NettyUtils.ATTR_KEY_USERNAME).get();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
/*@Deprecated
|
||||
public static void sessionStolen(Channel channel, boolean value) {
|
||||
channel.attr(NettyUtils.ATTR_KEY_SESSION_STOLEN).set(value);
|
||||
}
|
||||
@@ -81,5 +81,5 @@ public class NettyUtils {
|
||||
@Deprecated
|
||||
public static Boolean sessionStolen(Channel channel) {
|
||||
return (Boolean) channel.attr(NettyUtils.ATTR_KEY_SESSION_STOLEN).get();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user