> while (rc < bytes.array().length) {
> rc += socketChannel.write(bytes);
> }
This code is not atomic. So, if many threads write messages in same time, then
all mixed in single garbage.
I fixed this just uncommented lock around loop. It is not problem, because if
have not contention, that lock is very light. But if have contention, that slow
application better than garbage instead of message.
But best fix is write from one thread through message queue.
Original issue reported on code.google.com by grinch...@gmail.com on 20 Nov 2014 at 1:11
Original issue reported on code.google.com by
grinch...@gmail.com
on 20 Nov 2014 at 1:11Attachments: