Only create UnsafeDynamicChannelBuffer if really needed. See #108
This commit is contained in:
parent
229c8734ed
commit
7d9879d5cc
@ -565,9 +565,10 @@ public abstract class ReplayingDecoder<T extends Enum<T>>
|
||||
private ChannelBuffer cumulation(ChannelHandlerContext ctx) {
|
||||
ChannelBuffer buf = this.cumulation;
|
||||
if (buf == null) {
|
||||
ChannelBufferFactory factory = ctx.getChannel().getConfig().getBufferFactory();
|
||||
buf = new UnsafeDynamicChannelBuffer(factory);
|
||||
|
||||
if (cumulation == null) {
|
||||
ChannelBufferFactory factory = ctx.getChannel().getConfig().getBufferFactory();
|
||||
buf = new UnsafeDynamicChannelBuffer(factory);
|
||||
cumulation = buf;
|
||||
replayable = new ReplayingDecoderBuffer(buf);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user