Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50044 for APR connector
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Oct 2010 22:10:27 +0000 (22:10 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Oct 2010 22:10:27 +0000 (22:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1006358 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/tomcat/util/net/AprEndpoint.java
webapps/docs/changelog.xml

index a0911af..a5b374b 100644 (file)
@@ -597,7 +597,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
         } else if (actionCode == ActionCode.COMET_END) {
             comet = false;
         } else if (actionCode == ActionCode.COMET_CLOSE) {
-            //no op
+            endpoint.processSocketAsync(this.socket, SocketStatus.OPEN);
         } else if (actionCode == ActionCode.COMET_SETTIMEOUT) {
             //no op
         } else if (actionCode == ActionCode.ASYNC_COMPLETE) {
index 4ecb2f6..fcf8349 100644 (file)
@@ -989,9 +989,11 @@ public class AprEndpoint extends AbstractEndpoint {
                     waitingRequests.iterator();
                 while (sockets.hasNext()) {
                     SocketWrapper<Long> socket = sockets.next();
-                    long access = socket.getLastAccess();
-                    if ((now-access)>socket.getTimeout()) {
-                        processSocketAsync(socket,SocketStatus.TIMEOUT);
+                    if (socket.async) {
+                        long access = socket.getLastAccess();
+                        if ((now-access)>socket.getTimeout()) {
+                            processSocketAsync(socket,SocketStatus.TIMEOUT);
+                        }
                     }
                 }
 
index 67e10ed..36cb935 100644 (file)
         (kfujino) 
       </fix>
       <fix>
+        <bug>50044</bug>: Fix issue in APR/native connector when using comet
+        where socket remained in long poll after the comet request has ended.
+        (markt) 
+      </fix>
+      <fix>
         <bug>50054</bug>: Correctly handle the setting of minSpareThreads in 
         AJP connector. (kfujino) 
       </fix>