From ddba6c20cd78a562abc0766a2e82de16034793ed Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 2 Dec 2015 16:46:20 +1100 Subject: [PATCH] 483427 - AsyncContext complete while pending async Reads/Writes --- .../jetty/servlet/AsyncServletIOTest.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java index 1095b9f0873..460f3799d9f 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java @@ -658,16 +658,23 @@ public class AsyncServletIOTest assertTrue(chunked); // Get body slowly - String last; - while (true) + String last=null; + try { - last=line; - //Thread.sleep(1000); - line = in.readLine(); - LOG.debug("body: "+line); - if (line==null) - break; - list.add(line); + while (true) + { + last=line; + //Thread.sleep(1000); + line = in.readLine(); + LOG.debug("body: "+line); + if (line==null) + break; + list.add(line); + } + } + catch(IOException e) + { + } LOG.debug("last: "+last);