[#960] Fix calculation of writerIndex() which was incorrect and so result in truncated DatagramPackets when using NIO
This commit is contained in:
parent
1295f6d331
commit
76d7829d38
|
@ -200,7 +200,7 @@ public final class NioDatagramChannel
|
||||||
if (remoteAddress == null) {
|
if (remoteAddress == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
buf.add(new DatagramPacket(buffer.writerIndex(buffer.writerIndex() + data.remaining()), remoteAddress));
|
buf.add(new DatagramPacket(buffer.writerIndex(buffer.writerIndex() + data.position()), remoteAddress));
|
||||||
free = false;
|
free = false;
|
||||||
return 1;
|
return 1;
|
||||||
} catch (Throwable cause) {
|
} catch (Throwable cause) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user