3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/ServerConnection.patch
2020-01-22 08:00:00 +11:00

25 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/ServerConnection.java
+++ b/net/minecraft/server/ServerConnection.java
@@ -77,10 +77,20 @@
channel.pipeline().addLast("packet_handler", networkmanager);
networkmanager.setPacketListener(new HandshakeListener(ServerConnection.this.e, networkmanager));
}
- }).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();