Downgrade to @netty CR1
This commit is contained in:
parent
9a0da50e6c
commit
3f994a1c4c
2
pom.xml
2
pom.xml
@ -59,7 +59,7 @@
|
||||
|
||||
<properties>
|
||||
<build.number>unknown</build.number>
|
||||
<netty.version>4.0.0.CR2</netty.version>
|
||||
<netty.version>4.0.0.CR1</netty.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
@ -84,7 +84,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.
|
||||
*/
|
||||
@ -282,7 +282,7 @@ public class BungeeCord extends ProxyServer
|
||||
}
|
||||
|
||||
getLogger().info( "Closing IO threads" );
|
||||
eventLoops.shutdownGracefully();
|
||||
eventLoops.shutdown();
|
||||
|
||||
getLogger().info( "Saving reconnect locations" );
|
||||
reconnectHandler.save();
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.md_5.bungee.netty;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.MessageBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.ReplayingDecoder;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -26,7 +25,7 @@ public class PacketDecoder extends ReplayingDecoder<Void>
|
||||
private int protocol;
|
||||
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf in, MessageBuf<Object> out) throws Exception
|
||||
protected byte[] decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception
|
||||
{
|
||||
// While we have enough data
|
||||
while ( true )
|
||||
@ -48,7 +47,7 @@ public class PacketDecoder extends ReplayingDecoder<Void>
|
||||
// Checkpoint our state incase we don't have enough data for another packet
|
||||
checkpoint();
|
||||
// Store our decoded message
|
||||
out.add( buf );
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user