422807 fragment large written byte arrays to protect from JVM OOM bug
This commit is contained in:
parent
cb412d8a0d
commit
51e82b4c5c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue