tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1359183 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java
Date Mon, 09 Jul 2012 14:15:27 GMT
Author: markt
Date: Mon Jul  9 14:15:27 2012
New Revision: 1359183

URL: http://svn.apache.org/viewvc?rev=1359183&view=rev
Log:
Improve Connector.stop() handling and APR. This particularly affects Comet where a unit test
failure was seen on some Linux platforms.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
    tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1359183&r1=1359182&r2=1359183&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Mon Jul  9 14:15:27
2012
@@ -282,11 +282,9 @@ public class Http11AprProtocol extends A
                 socket.setAsync(true);
             } else if (processor.isComet()) {
                 // Comet
-                if (proto.endpoint.isRunning()) {
-                    ((AprEndpoint) proto.endpoint).getCometPoller().add(
-                            socket.getSocket().longValue(),
-                            proto.endpoint.getSoTimeout());
-                }
+                ((AprEndpoint) proto.endpoint).getCometPoller().add(
+                        socket.getSocket().longValue(),
+                        proto.endpoint.getSoTimeout());
             } else {
                 // Upgraded
                 ((AprEndpoint) proto.endpoint).getPoller().add(

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1359183&r1=1359182&r2=1359183&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Jul  9 14:15:27 2012
@@ -1167,6 +1167,10 @@ public class AprEndpoint extends Abstrac
          *                  socket. Use -1 for infinite timeout
          */
         public void add(long socket, int timeout) {
+            if (!running) {
+                processSocket(socket, SocketStatus.STOP);
+                return;
+            }
             synchronized (this) {
                 // Add socket to the list. Newly added sockets will wait
                 // at most for pollTime before being polled



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


Mime
View raw message