Fix netty warning spam when sending >1MB packets (#4363)

This commit is contained in:
Bartosz Skrzypczak 2017-08-30 00:20:03 +02:00 committed by LexManos
parent 161b47ee75
commit 8803bf9a29

View file

@ -526,10 +526,12 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
else
{
List<Packet<INetHandlerPlayClient>> parts = ((FMLProxyPacket)msg).toS3FPackets();
for (Packet<INetHandlerPlayClient> 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