From aa1a871967f94def74bd774cafd6d428b1758abe Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 14:33:47 +1000 Subject: [PATCH] Actually use our threadLocal. Do'h --- proxy/src/main/java/net/md_5/bungee/netty/CipherBase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/netty/CipherBase.java b/proxy/src/main/java/net/md_5/bungee/netty/CipherBase.java index 55eef908..f5999cdc 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/CipherBase.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/CipherBase.java @@ -38,6 +38,7 @@ public class CipherBase if ( heapIn.length < readableBytes ) { heapIn = new byte[ readableBytes ]; + heapInLocal.set( heapIn ); } in.readBytes( heapIn, 0, readableBytes ); @@ -46,6 +47,7 @@ public class CipherBase if ( heapOut.length < outputSize ) { heapOut = new byte[ outputSize ]; + heapOutLocal.set( heapOut ); } out.writeBytes( heapOut, 0, cipher.update( heapIn, 0, readableBytes, heapOut ) ); }