409403 fix IllegalStateException when SPDY is used and the response is written through BufferUtil.writeTo byte by byte

Removed the clear from ChannelEndPoint#flush
This commit is contained in:
Greg Wilkins 2013-06-06 17:13:45 +10:00 committed by Joakim Erdfelt
parent c22a8f195e
commit 5b60d42d3a
1 changed files with 4 additions and 12 deletions

View File

@ -186,22 +186,14 @@ public class ChannelEndPoint extends AbstractEndPoint implements SocketBased
throw new EofException(e);
}
boolean all_flushed=true;
if (flushed>0)
{
notIdle();
// clear empty buffers to prevent position creeping up the buffer
for (ByteBuffer b : buffers)
{
if (BufferUtil.isEmpty(b))
BufferUtil.clear(b);
else
all_flushed=false;
}
}
for (ByteBuffer b : buffers)
if (!BufferUtil.isEmpty(b))
return false;
return all_flushed;
return true;
}
public ByteChannel getChannel()