tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1172711 - /tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
Date Mon, 19 Sep 2011 17:14:10 GMT
Author: markt
Date: Mon Sep 19 17:14:10 2011
New Revision: 1172711

URL: http://svn.apache.org/viewvc?rev=1172711&view=rev
Log:
Don't add to Poller when socket is closing to prevent NPEs.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.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=1172711&r1=1172710&r2=1172711&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Mon Sep 19 17:14:10
2011
@@ -215,7 +215,7 @@ public class Http11AprProtocol extends A
                 boolean addToPoller) {
             processor.recycle();
             recycledProcessors.offer(processor);
-            if (addToPoller) {
+            if (addToPoller && proto.endpoint.isRunning()) {
                 ((AprEndpoint)proto.endpoint).getPoller().add(
                         socket.getSocket().longValue(), true);
             }
@@ -234,7 +234,7 @@ public class Http11AprProtocol extends A
 
             if (processor.isAsync()) {
                 socket.setAsync(true);
-            } else if (processor.comet) {
+            } else if (processor.comet && proto.endpoint.isRunning()) {
                 ((AprEndpoint) proto.endpoint).getCometPoller().add(
                         socket.getSocket().longValue(), false);
             }



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


Mime
View raw message