Fix a bug in ChannelOutboundBuffer.addFlush()

It should not advance the tail if no write() was issued so far.
This commit is contained in:
Trustin Lee 2013-07-11 01:05:26 +09:00
parent b57d9f307f
commit b7a7c33fe3

View File

@ -98,6 +98,10 @@ final class ChannelOutboundBuffer {
void addFlush() {
int tail = this.tail;
if (messages[tail] == null) {
return;
}
if ((this.tail = tail + 1 & messages.length - 1) == head) {
doubleCapacity();
}