[#1658] Allow to use AbstractTrafficShapingHandler also with ByteBufHolder based messages
This commit is contained in:
parent
59c2fd8813
commit
8af5ea8d4f
@ -211,8 +211,7 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
|
||||
|
||||
@Override
|
||||
public void channelRead(final ChannelHandlerContext ctx, final Object msg) throws Exception {
|
||||
ByteBuf buf = (ByteBuf) msg;
|
||||
long size = buf.readableBytes();
|
||||
long size = calculateSize(msg);
|
||||
long curtime = System.currentTimeMillis();
|
||||
|
||||
if (trafficCounter != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user