Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +01:00
30 Zeilen
1.4 KiB
Diff
30 Zeilen
1.4 KiB
Diff
--- a/net/minecraft/server/ServerConnection.java
|
|
+++ b/net/minecraft/server/ServerConnection.java
|
|
@@ -74,14 +74,24 @@
|
|
int j = ServerConnection.this.e.k();
|
|
Object object = j > 0 ? new NetworkManagerServer(j) : new NetworkManager(EnumProtocolDirection.SERVERBOUND);
|
|
|
|
- ServerConnection.this.connectedChannels.add(object);
|
|
+ ServerConnection.this.connectedChannels.add((NetworkManager) object); // CraftBukkit - decompile error
|
|
channel.pipeline().addLast("packet_handler", (ChannelHandler) object);
|
|
((NetworkManager) object).setPacketListener(new HandshakeListener(ServerConnection.this.e, (NetworkManager) object));
|
|
}
|
|
- }).group((EventLoopGroup) lazyinitvar.a()).localAddress(inetaddress, i)).bind().syncUninterruptibly());
|
|
+ }).group((EventLoopGroup) lazyinitvar.a()).localAddress(inetaddress, i)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit
|
|
}
|
|
}
|
|
|
|
+ // CraftBukkit start
|
|
+ public void acceptConnections() {
|
|
+ synchronized (this.listeningChannels) {
|
|
+ for (ChannelFuture future : this.listeningChannels) {
|
|
+ future.channel().config().setAutoRead(true);
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public void b() {
|
|
this.c = false;
|
|
Iterator iterator = this.listeningChannels.iterator();
|