Description
In flushNow() it appears to me that when writeBuffer is called, when the buffer is completely sent, we will always come into the buffer isn't empty check.
if (message instanceof IoBuffer) {
localWrittenBytes = writeBuffer(
session, req, hasFragmentation,
maxWrittenBytes - writtenBytes,
currentTime);
if (localWrittenBytes > 0 && ((IoBuffer)message).hasRemaining() )
}
In writeBuffer this is done:
if (!buf.hasRemaining() ||
!hasFragmentation && localWrittenBytes != 0)
fireMessageSent clears the write request, so when we come back after select() we wont double send data but it seems like twice the work is being done.