Author: remy.maucherat(a)jboss.com
Date: 2011-09-09 11:44:36 -0400 (Fri, 09 Sep 2011)
New Revision: 1838
Modified:
trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Log:
- Use the open socket flag also (otherwise, the socket will never be closed if it's
not added to the poller
when there is an error).
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 2011-09-09 15:42:45 UTC (rev
1837)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 2011-09-09 15:44:36 UTC (rev
1838)
@@ -425,7 +425,7 @@
// Error flag
error = false;
- boolean openSocket = true;
+ boolean openSocket = false;
boolean keptAlive = false;
while (!error && !event) {
@@ -437,7 +437,7 @@
// This means that no data is available right now
// (long keepalive), so that the processor should be recycled
// and the method should return true
- rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
+ openSocket = true;
// Add the socket to the poller
endpoint.getPoller().add(socket);
break;
@@ -534,7 +534,7 @@
}
} else {
recycle();
- return SocketState.OPEN;
+ return (openSocket) ? SocketState.OPEN : SocketState.CLOSED;
}
}