Author: remy.maucherat(a)jboss.com
Date: 2008-11-02 13:39:47 -0500 (Sun, 02 Nov 2008)
New Revision: 842
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
Log:
- If processing an ERROR, set the error flag.
- Use the error flag to avoid any useless native operations which could be risky given the
socket state.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-11-02 02:39:41 UTC
(rev 841)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-11-02 18:39:47 UTC
(rev 842)
@@ -780,6 +780,9 @@
} else if (status == SocketStatus.OPEN_CALLBACK) {
// The resume notification is now done
resumeNotification = false;
+ } else if (status == SocketStatus.ERROR) {
+ // Set error flag right away
+ error = true;
}
containerThread.set(Boolean.TRUE);
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
@@ -1261,7 +1264,9 @@
// End non blocking mode
outputBuffer.setNonBlocking(false);
inputBuffer.setNonBlocking(false);
- Socket.timeoutSet(socket, endpoint.getSoTimeout() * 1000);
+ if (!error) {
+ Socket.timeoutSet(socket, endpoint.getSoTimeout() * 1000);
+ }
} else if (actionCode == ActionCode.ACTION_COMET_SUSPEND) {
readNotifications = false;
} else if (actionCode == ActionCode.ACTION_COMET_RESUME) {
Show replies by date