Fix likely cause of Gump failure. Fix for https://issues.apache.org/bugzilla/show_bug...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 29 Aug 2010 14:50:11 +0000 (14:50 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 29 Aug 2010 14:50:11 +0000 (14:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@990590 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/AsyncContextImpl.java

index b636bc6..06981a8 100644 (file)
@@ -318,10 +318,12 @@ public class AsyncContextImpl implements AsyncContext {
                 // Listener should have called complete
                 if (state.get() != AsyncState.NOT_STARTED) {
                     ((HttpServletResponse)servletResponse).setStatus(500);
+                    state.set(AsyncState.COMPLETING);
                     doInternalComplete(true);
                 }
             } else {
                 // No listeners, container calls complete
+                state.set(AsyncState.COMPLETING);
                 doInternalComplete(false);
             }
         } else if (this.state.compareAndSet(AsyncState.ERROR_DISPATCHING, AsyncState.COMPLETING)) {