Author: remy.maucherat(a)jboss.com
Date: 2008-02-26 08:58:39 -0500 (Tue, 26 Feb 2008)
New Revision: 449
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
Log:
- Fix setting non blocking mode.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-02-26 13:06:42 UTC
(rev 448)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-02-26 13:58:39 UTC
(rev 449)
@@ -786,6 +786,7 @@
// but is wasteful.
outputBuffer.flushLeftover();
}
+ containerThread.set(Boolean.TRUE);
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
error = !adapter.event(request, response, status);
} catch (InterruptedIOException e) {
@@ -1259,13 +1260,13 @@
comet = true;
// Set socket to non blocking mode
Socket.optSet(socket, Socket.APR_SO_NONBLOCK, 1);
- containerThread.set(Boolean.TRUE);
+ Socket.timeoutSet(socket, 0);
outputBuffer.setNonBlocking(true);
} else if (actionCode == ActionCode.ACTION_COMET_END) {
comet = false;
// End non blocking mode
Socket.optSet(socket, Socket.APR_SO_NONBLOCK, 0);
- containerThread.set(null);
+ Socket.timeoutSet(socket, endpoint.getSoTimeout());
outputBuffer.setNonBlocking(false);
} else if (actionCode == ActionCode.ACTION_COMET_SUSPEND) {
readNotifications = false;
Show replies by date