Author: markt
Date: Fri May 27 16:35:43 2011
New Revision: 1128386

URL: http://svn.apache.org/viewvc?rev=1128386&view=rev
Log:
Fix NPE triggered by r1127962

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1128386&r1=1128385&r2=1128386&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Fri May 
27 16:35:43 2011
@@ -114,8 +114,10 @@ public abstract class AbstractEndpoint {
     public void setMaxConnections(int maxCon) {
         this.maxConnections = maxCon;
         LimitLatch latch = this.connectionLimitLatch;
-        // Update the latch that enforces this
-        latch.setLimit(maxCon);
+        if (latch != null) {
+            // Update the latch that enforces this
+            latch.setLimit(maxCon);
+        }
     }
 
     public int  getMaxConnections() { return this.maxConnections; }



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

Reply via email to