tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1128386 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Date Fri, 27 May 2011 16:35:44 GMT
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message