This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 0424263  Remove unnecessary code
0424263 is described below

commit 0424263b9109c79a43c5e6b9d70a16d4f3fad872
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Aug 14 17:47:08 2019 +0100

    Remove unnecessary code
    
    All currently supported versions of Windows support large pollsets
---
 java/org/apache/tomcat/util/net/AprEndpoint.java | 14 ++------------
 webapps/docs/changelog.xml                       |  5 +++++
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java 
b/java/org/apache/tomcat/util/net/AprEndpoint.java
index ba54c1d..4d8fd25 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -2161,25 +2161,15 @@ public class AprEndpoint extends AbstractEndpoint<Long> 
{
         private volatile boolean sendfileRunning = true;
 
         /**
-         * Create the sendfile poller. With some versions of APR, the maximum
-         * poller size will be 62 (recompiling APR is necessary to remove this
-         * limitation).
+         * Create the sendfile poller.
          */
         protected void init() {
             pool = Pool.create(serverSockPool);
             int size = sendfileSize;
             if (size <= 0) {
-                size = (OS.IS_WIN32 || OS.IS_WIN64) ? (1 * 1024) : (16 * 1024);
+                size = 16 * 1024;
             }
             sendfilePollset = allocatePoller(size, pool, getSoTimeout());
-            if (sendfilePollset == 0 && size > 1024) {
-                size = 1024;
-                sendfilePollset = allocatePoller(size, pool, getSoTimeout());
-            }
-            if (sendfilePollset == 0) {
-                size = 62;
-                sendfilePollset = allocatePoller(size, pool, getSoTimeout());
-            }
             desc = new long[size * 2];
             sendfileData = new HashMap<Long, SendfileData>(size);
             addS = new ArrayList<SendfileData>();
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7c98806..f49f6d2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,11 @@
         <bug>63578</bug>: Improve handling of invalid requests so that 400
         responses are returned to the client rather than 500 responses. (markt)
       </fix>
+      <scode>
+        Remove the code in the sendfile poller that ensured smaller pollsets
+        were used with older, no longer supported versions of Windows that
+        could not support larger pollsets. (markt)
+      </scode>
     </changelog>
   </subsection>
   <subsection name="Other">


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

Reply via email to