422807 fragment large written byte arrays to protect from JVM OOM bug

This commit is contained in:
Greg Wilkins 2013-11-29 14:28:07 +11:00
parent cb412d8a0d
commit 51e82b4c5c
2 changed files with 2 additions and 3 deletions

View File

@ -839,7 +839,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
_buffer.position(pl);
_slice.position(p);
_completed=!_buffer.hasRemaining();
_channel.write(_buffer, _complete && _completed, this);
_channel.write(_slice, _complete && _completed, this);
return State.SCHEDULED;
}

View File

@ -128,8 +128,6 @@ public class AsyncServletIOTest
Assert.assertThat(_owp.get(),Matchers.greaterThan(1));
}
@Test
public void testRead() throws Exception
{
@ -234,6 +232,7 @@ public class AsyncServletIOTest
break;
//System.err.println("line: "+line.length()+"\t"+(line.length()>40?(line.substring(0,40)+"..."):line));
list.add(line);
Thread.sleep(50);
}
}