This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit f0d908551e4c60819075f4461f34a20bf39682af 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 2b60bf4..0c4d87f 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -759,10 +759,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 3342007..02fe82a 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