Author: markt
Date: Mon Jul 27 15:44:34 2015
New Revision: 1692901

URL: http://svn.apache.org/r1692901
Log:
Disable maxConnections by default for NIO2 but still allow it to be set rather 
than forcibly disabling maxConnections support with NIO2.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1692901&r1=1692900&r2=1692901&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Jul 27 
15:44:34 2015
@@ -96,9 +96,15 @@ public class Nio2Endpoint extends Abstra
     private SynchronizedStack<Nio2Channel> nioChannels;
 
 
-    // ------------------------------------------------------------- Properties
+    public Nio2Endpoint() {
+        // Override the defaults for NIO2
+        // Disable maxConnections by default for NIO2 (see BZ58103)
+        setMaxConnections(-1);
+    }
 
 
+    // ------------------------------------------------------------- Properties
+
     /**
      * Handling of accepted sockets.
      */
@@ -195,10 +201,6 @@ public class Nio2Endpoint extends Abstra
             // NIO2 does not allow any form of IO concurrency
             acceptorThreadCount = 1;
         }
-        // Disable maxConnections feature, mostly designed for APR rather than 
NIO2, and has issues (BZ58103)
-        if (getMaxConnections() != -1) {
-            setMaxConnections(-1);
-        }
 
         // Initialize SSL if needed
         initialiseSsl();



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

Reply via email to