netty5/transport-native-unix-common/src
Scott Mitchell 33ddb83dc1
IovArray#add return value resulted in more ByteBufs being added during iteration
Motivation:
IovArray implements MessageProcessor, and the processMessage method will continue to be called during iteration until it returns true. A recent commit b215794de3 changed the return value to only return true if any component of a CompositeByteBuf was added as a result of the method call. However this results in the iteration continuing, and potentially subsequent smaller buffers maybe added, which will result in out of order writes and generally corrupts data.

Modifications:
- IovArray#add should return false so that the MessageProcessor#processMessage will stop iterating.

Result:
Native transports which use IovArray will not corrupt data during gathering writes of CompositeByteBuf objects.
2018-01-04 08:04:32 -08:00
..
main IovArray#add return value resulted in more ByteBufs being added during iteration 2018-01-04 08:04:32 -08:00
test/java/io/netty/channel/unix fix UnixChannelUtil#isBufferCopyNeededForWrite 2017-06-24 21:27:54 -07:00