tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r533272 - in /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11: Http11AprProcessor.java Http11AprProtocol.java Http11NioProcessor.java Http11NioProtocol.java
Date Sat, 28 Apr 2007 00:49:07 GMT
Author: remm
Date: Fri Apr 27 17:49:06 2007
New Revision: 533272

URL: http://svn.apache.org/viewvc?view=rev&rev=533272
Log:
- Add socket to the poller after cleanup in the connection handler event method (possible
memory leak).

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?view=diff&rev=533272&r1=533271&r2=533272
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Fri Apr 27
17:49:06 2007
@@ -753,11 +753,9 @@
             recycle();
             return SocketState.CLOSED;
         } else if (!comet) {
-            endpoint.getPoller().add(socket);
             recycle();
             return SocketState.OPEN;
         } else {
-            endpoint.getCometPoller().add(socket);
             return SocketState.LONG;
         }
     }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?view=diff&rev=533272&r1=533271&r2=533272
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Fri Apr 27 17:49:06
2007
@@ -560,6 +560,11 @@
                     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);
                     }
                 }
             }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=533272&r1=533271&r2=533272
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Fri Apr 27
17:49:06 2007
@@ -782,11 +782,9 @@
             recycle();
             return SocketState.CLOSED;
         } else if (!comet) {
-            socket.getPoller().add(socket);
             recycle();
             return SocketState.OPEN;
         } else {
-            socket.getPoller().add(socket);
             return SocketState.LONG;
         }
     }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?view=diff&rev=533272&r1=533271&r2=533272
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Fri Apr 27 17:49:06
2007
@@ -665,8 +665,12 @@
                     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);
                     }
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message