From 20b1b37e540612d53a5210993337e8cbc1395606 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 28 Oct 2013 20:43:28 +1100 Subject: [PATCH] Did someone say great performance increases? --- proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java index fd22e5c0..ef78cd00 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java @@ -1,5 +1,6 @@ package net.md_5.bungee.netty; +import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; import io.netty.channel.ChannelException; import io.netty.channel.ChannelInitializer; @@ -74,6 +75,7 @@ public class PipelineUtils { // IP_TOS is not supported (Windows XP / Windows Server 2003) } + ch.config().setAllocator( PooledByteBufAllocator.DEFAULT ); ch.pipeline().addLast( TIMEOUT_HANDLER, new ReadTimeoutHandler( BungeeCord.getInstance().config.getTimeout(), TimeUnit.MILLISECONDS ) ); ch.pipeline().addLast( FRAME_DECODER, new Varint21FrameDecoder() );