From: markt Date: Fri, 27 May 2011 16:35:43 +0000 (+0000) Subject: Fix NPE triggered by r1127962 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=89c87ba193c6131121c2275cb384b95e3efd5fe6;p=tomcat7.0 Fix NPE triggered by r1127962 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1128386 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java index bbc7c0a04..84fa371cd 100644 --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java @@ -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; }