Musical versions

This commit is contained in:
md_5
2013-06-05 20:30:34 +10:00
parent b1e3f6a75b
commit ce8f1b44b6
3 changed files with 6 additions and 6 deletions

View File

@@ -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 );

View File

@@ -28,7 +28,7 @@ public class PacketDecoder extends ReplayingDecoder<Void>
private Protocol protocol;
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, MessageBuf<Object> 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<Void>
// Store our decoded message
if ( packet != null )
{
out.add( new PacketWrapper( packet, buf ) );
return( new PacketWrapper( packet, buf ) );
} else
{
out.add( buf );
return( buf );
}
}
}