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

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

commit 0ff941db2e321192fc0fced6dfb3131b34e0bf67
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Nov 9 18:55:28 2021 +0000

    Fix root cause of APR crash observed in unit tests on Windows
---
 java/org/apache/tomcat/util/net/AprEndpoint.java | 4 ++--
 webapps/docs/changelog.xml                       | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java 
b/java/org/apache/tomcat/util/net/AprEndpoint.java
index c97e3e1..79ef971 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -755,10 +755,10 @@ public class AprEndpoint extends 
AbstractEndpoint<Long,Long> implements SNICallB
         } catch (Error e) {
             if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
                 log.info(sm.getString("endpoint.poll.limitedpollsize", "" + 
size));
-                return 0;
+                throw new RuntimeException(e);
             } else {
                 log.error(sm.getString("endpoint.poll.initfail"), e);
-                return -1;
+                throw new RuntimeException(e);
             }
         }
     }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bdde649..b363352 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -151,6 +151,11 @@
         Fix APR connector stop so it correctly waits for the sendfile thread, 
if
         any, to exit. (markt)
       </fix>
+      <fix>
+        Do not ignore the error condition if the APR connector is not able to
+        open a sever socket as continuing in this case will trigger a JVM 
crash.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">

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

Reply via email to