Make sure we don't fill up the cache after pause has been initated
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 11 Aug 2006 16:22:52 +0000 (16:22 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 11 Aug 2006 16:22:52 +0000 (16:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@430816 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/NioEndpoint.java

index f62b6a6..4d6487b 100644 (file)
@@ -154,7 +154,7 @@ public class NioEndpoint {
     protected ConcurrentLinkedQueue<NioChannel> nioChannels = new ConcurrentLinkedQueue<NioChannel>() {
         public boolean offer(NioChannel o) {
             //avoid over growing our cache or add after we have stopped
-            if ( running && (size() < curThreads) ) return super.offer(o);
+            if ( running && (!paused) && (size() < curThreads) ) return super.offer(o);
             else return false;
         }
     };