Only try gathering writes if we have more then one buffer to write. Part of [#2680].

This commit is contained in:
Norman Maurer 2014-07-20 19:59:55 +02:00
parent cb2246ee07
commit e7310cc4c0

View File

@ -251,7 +251,7 @@ public class NioSocketChannel extends AbstractNioByteChannel implements io.netty
ByteBuffer[] nioBuffers = in.nioBuffers();
int nioBufferCnt = in.nioBufferCount();
if (nioBufferCnt == 0) {
if (nioBufferCnt <= 1) {
// We have something else beside ByteBuffers to write so fallback to normal writes.
super.doWrite(in);
break;