Skip to content

Commit

Permalink
Issue #4331 Close Complete
Browse files Browse the repository at this point in the history
Fix write loop to handle clear of p=0,l=0 rather than p=l

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Dec 8, 2019
1 parent 8340a20 commit ca0e0c4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -579,9 +579,11 @@ public void write(byte[] b, int off, int len) throws IOException
while (len > getBufferSize())
{
int p = view.position();
view.limit(p + getBufferSize());
int l = p + getBufferSize();
view.limit(l);
channelWrite(view, false);
view.limit(p + len);
view.position(l);
len -= getBufferSize();
}
channelWrite(view, last);
Expand Down

0 comments on commit ca0e0c4

Please sign in to comment.