From 8803bf9a29f426f1025924b56c9d1572e01fde23 Mon Sep 17 00:00:00 2001 From: Bartosz Skrzypczak Date: Wed, 30 Aug 2017 00:20:03 +0200 Subject: [PATCH] Fix netty warning spam when sending >1MB packets (#4363) --- .../fml/common/network/handshake/NetworkDispatcher.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java b/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java index 13d7cfe42..007ae53b6 100644 --- a/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java +++ b/src/main/java/net/minecraftforge/fml/common/network/handshake/NetworkDispatcher.java @@ -526,10 +526,12 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler> im else { List> parts = ((FMLProxyPacket)msg).toS3FPackets(); - for (Packet pkt : parts) + int sizeMinusOne = parts.size() - 1; + for (int i = 0; i < sizeMinusOne; i++) { - ctx.write(pkt, promise); + ctx.write(parts.get(i), ctx.voidPromise()); } + ctx.write(parts.get(sizeMinusOne), promise); } } else