Commit 61a34e5d authored by daryl herzmann's avatar daryl herzmann Committed by GitHub

Merge pull request #653 from jforsell/master

OF-1201: Complete context if an exception is thrown when setting read listener
parents 10602445 74565cfe
...@@ -149,7 +149,12 @@ public class HttpBindServlet extends HttpServlet { ...@@ -149,7 +149,12 @@ public class HttpBindServlet extends HttpServlet {
final AsyncContext context = request.startAsync(); final AsyncContext context = request.startAsync();
// Asynchronously reads the POSTed input, then triggers #processContent. // Asynchronously reads the POSTed input, then triggers #processContent.
request.getInputStream().setReadListener(new ReadListenerImpl(context)); try {
request.getInputStream().setReadListener(new ReadListenerImpl(context));
} catch (IllegalStateException e) {
Log.warn("Error when setting read listener", e);
context.complete();
}
} }
protected void processContent(AsyncContext context, String content) protected void processContent(AsyncContext context, String content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment