From ce8f1b44b6d3dda9cc4e898c92186aa25c169f20 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 5 Jun 2013 20:30:34 +1000 Subject: [PATCH] Musical versions --- pom.xml | 2 +- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 4 ++-- .../src/main/java/net/md_5/bungee/netty/PacketDecoder.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 0d8dfef1..1623896c 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ unknown - 4.0.0.CR3 + 4.0.0.CR1 UTF-8 diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index 971a979c..525795e1 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -81,7 +81,7 @@ public class BungeeCord extends ProxyServer * Thread pools. */ public final ScheduledThreadPoolExecutor executors = new BungeeThreadPool( new ThreadFactoryBuilder().setNameFormat( "Bungee Pool Thread #%1$d" ).build() ); - public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( NioEventLoopGroup.DEFAULT_EVENT_LOOP_THREADS, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); + public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); /** * locations.yml save thread. */ @@ -293,7 +293,7 @@ public class BungeeCord extends ProxyServer } getLogger().info( "Closing IO threads" ); - eventLoops.shutdownGracefully(); + eventLoops.shutdown(); try { eventLoops.awaitTermination( Long.MAX_VALUE, TimeUnit.NANOSECONDS ); diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PacketDecoder.java b/proxy/src/main/java/net/md_5/bungee/netty/PacketDecoder.java index 1ac7106d..3f208951 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/PacketDecoder.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/PacketDecoder.java @@ -28,7 +28,7 @@ public class PacketDecoder extends ReplayingDecoder private Protocol protocol; @Override - protected void decode(ChannelHandlerContext ctx, ByteBuf in, MessageBuf out) throws Exception + protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception { // While we have enough data while ( true ) @@ -53,10 +53,10 @@ public class PacketDecoder extends ReplayingDecoder // Store our decoded message if ( packet != null ) { - out.add( new PacketWrapper( packet, buf ) ); + return( new PacketWrapper( packet, buf ) ); } else { - out.add( buf ); + return( buf ); } } }