- Add socket to the poller after cleanup in the connection handler event method ...
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 28 Apr 2007 00:49:06 +0000 (00:49 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 28 Apr 2007 00:49:06 +0000 (00:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@533272 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11AprProtocol.java
java/org/apache/coyote/http11/Http11NioProcessor.java
java/org/apache/coyote/http11/Http11NioProtocol.java

index 3d7eaad..61fc53a 100644 (file)
@@ -753,11 +753,9 @@ public class Http11AprProcessor implements ActionHook {
             recycle();
             return SocketState.CLOSED;
         } else if (!comet) {
-            endpoint.getPoller().add(socket);
             recycle();
             return SocketState.OPEN;
         } else {
-            endpoint.getCometPoller().add(socket);
             return SocketState.LONG;
         }
     }
index 42d3c9b..3a659b9 100644 (file)
@@ -560,6 +560,11 @@ public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration {
                     if (state != SocketState.LONG) {
                         connections.remove(socket);
                         recycledProcessors.offer(result);
+                        if (state == SocketState.OPEN) {
+                            proto.endpoint.getPoller().add(socket);
+                        }
+                    } else {
+                        proto.endpoint.getCometPoller().add(socket);
                     }
                 }
             }
index b74d550..9d3f8bc 100644 (file)
@@ -782,11 +782,9 @@ public class Http11NioProcessor implements ActionHook {
             recycle();
             return SocketState.CLOSED;
         } else if (!comet) {
-            socket.getPoller().add(socket);
             recycle();
             return SocketState.OPEN;
         } else {
-            socket.getPoller().add(socket);
             return SocketState.LONG;
         }
     }
index d313adf..8294c21 100644 (file)
@@ -665,8 +665,12 @@ public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration
                     if (state != SocketState.LONG) {
                         connections.remove(socket);
                         recycledProcessors.offer(result);
+                        if (state == SocketState.OPEN) {
+                            socket.getPoller().add(socket);
+                        }
                     } else {
                         if (log.isDebugEnabled()) log.debug("Keeping processor["+result);
+                        socket.getPoller().add(socket);
                     }
                 }
             }