Should we clear the buffer here as well?
When an exception is thrown from clientChannel.write(buffer);, the flipped buffer is put back to the pool in the next run of the while loop without being cleared. Is this expected?
clientChannel.write(buffer);
buffer
pool