You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/03/06 16:35:21 UTC

svn commit: r1664657 - /tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java

Author: markt
Date: Fri Mar  6 15:35:21 2015
New Revision: 1664657

URL: http://svn.apache.org/r1664657
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57592
Ensure that asyncStateMachine.asyncOperation() is only called during async processing. It was possible that this would be called once async processing had completed, triggering an ISE.

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1664657&r1=1664656&r2=1664657&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Fri Mar  6 15:35:21 2015
@@ -611,7 +611,7 @@ public class AjpProcessor extends Abstra
     @Override
     public SocketState asyncDispatch(SocketStatus status) {
 
-        if (status == SocketStatus.OPEN_WRITE) {
+        if (status == SocketStatus.OPEN_WRITE && response.getWriteListener() != null) {
             try {
                 asyncStateMachine.asyncOperation();
                 try {
@@ -635,8 +635,7 @@ public class AjpProcessor extends Abstra
             } catch (IllegalStateException x) {
                 socketWrapper.registerWriteInterest();
             }
-        } else if (status == SocketStatus.OPEN_READ &&
-                request.getReadListener() != null) {
+        } else if (status == SocketStatus.OPEN_READ && request.getReadListener() != null) {
             try {
                 if (available()) {
                     asyncStateMachine.asyncOperation();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org