[#1411] Correctly check for null in AbstractTrafficShapperHandler.read() and so prevent NPE

This commit is contained in:
Norman Maurer 2013-06-10 08:07:39 +02:00
parent e71a521284
commit 07858a3bd4

View File

@ -266,7 +266,8 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
@Override
public void read(ChannelHandlerContext ctx) {
if (!ctx.attr(READ_SUSPENDED).get()) {
Boolean suspended = ctx.attr(READ_SUSPENDED).get();
if (suspended == null || Boolean.FALSE.equals(suspended)) {
ctx.read();
}
}