Commit ed02705c authored by Johan Forsell's avatar Johan Forsell Committed by akrherz

Make sure to complete context if an exception is thrown when setting read listener.

parent e6a39eac
......@@ -149,7 +149,12 @@ public class HttpBindServlet extends HttpServlet {
final AsyncContext context = request.startAsync();
// 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)
......
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