Author: remy.maucherat(a)jboss.com
Date: 2008-08-13 13:13:12 -0400 (Wed, 13 Aug 2008)
New Revision: 742
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/webapps/docs/changelog.xml
Log:
- Fix problem when calling resume() during a begin event (either directly or using
close()).
- Always recycle all flags, as it can cause state problems otherwise in rare cases.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-08-11 13:55:10 UTC
(rev 741)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-08-13 17:13:12 UTC
(rev 742)
@@ -328,7 +328,7 @@
protected boolean readNotifications = true;
protected boolean writeNotification = false;
protected boolean resumeNotification = false;
- protected boolean cometProcessing = false;
+ protected boolean cometProcessing = true;
// ------------------------------------------------------------- Properties
@@ -793,13 +793,11 @@
if (error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
- recycleComet();
recycle();
return SocketState.CLOSED;
} else if (!comet) {
boolean pipelined = inputBuffer.nextRequest();
outputBuffer.nextRequest();
- recycleComet();
recycle();
return (pipelined) ? SocketState.CLOSED : SocketState.OPEN;
} else {
@@ -962,6 +960,7 @@
recycle();
return SocketState.CLOSED;
} else {
+ cometProcessing = false;
return SocketState.LONG;
}
} else {
@@ -1001,15 +1000,11 @@
inputBuffer.recycle();
outputBuffer.recycle();
this.socket = 0;
- }
-
-
- public void recycleComet() {
cometTimeout = -1;
readNotifications = true;
writeNotification = false;
resumeNotification = false;
- cometProcessing = false;
+ cometProcessing = true;
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-08-11 13:55:10 UTC (rev 741)
+++ trunk/webapps/docs/changelog.xml 2008-08-13 17:13:12 UTC (rev 742)
@@ -30,6 +30,14 @@
</add>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Consider that a normal request is Comet (it is possible to get a resume before
+ officially going into Comet mode). (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<fix>
Show replies by date