diff --git a/pom.xml b/pom.xml
index c902877c..1a71e452 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,7 @@
unknown
- 4.0.0.CR9
+ 4.0.6.Final
UTF-8
diff --git a/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java b/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java
index c7e4dcfc..fd486e04 100644
--- a/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java
@@ -31,7 +31,7 @@ public class HttpHandler extends SimpleChannelInboundHandler
}
@Override
- protected void messageReceived(ChannelHandlerContext ctx, HttpObject msg) throws Exception
+ protected void channelRead0(ChannelHandlerContext ctx, HttpObject msg) throws Exception
{
if ( msg instanceof HttpResponse )
{
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
index 81db19b7..9e5e8504 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
@@ -23,6 +23,7 @@ public class ChannelWrapper
if ( !closed )
{
ch.write( packet );
+ ch.flush();
}
}
@@ -31,6 +32,7 @@ public class ChannelWrapper
if ( !closed )
{
closed = true;
+ ch.flush();
ch.close();
}
}
@@ -38,6 +40,7 @@ public class ChannelWrapper
public void addBefore(String baseName, String name, ChannelHandler handler)
{
Preconditions.checkState( ch.eventLoop().inEventLoop(), "cannot add handler outside of event loop" );
+ ch.pipeline().flush();
ch.pipeline().addBefore( baseName, name, handler );
}
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/CipherDecoder.java b/proxy/src/main/java/net/md_5/bungee/netty/CipherDecoder.java
index 91fba349..e6fe7df9 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/CipherDecoder.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/CipherDecoder.java
@@ -2,8 +2,8 @@ package net.md_5.bungee.netty;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
-import io.netty.channel.MessageList;
import io.netty.handler.codec.MessageToMessageDecoder;
+import java.util.List;
import javax.crypto.Cipher;
public class CipherDecoder extends MessageToMessageDecoder
@@ -17,7 +17,7 @@ public class CipherDecoder extends MessageToMessageDecoder
}
@Override
- protected void decode(ChannelHandlerContext ctx, ByteBuf msg, MessageList