This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new d8fbc7925a Work-around unexplained linger behaviour on MacOS d8fbc7925a is described below commit d8fbc7925a1574546130610d0e2417e96c7977df Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Feb 13 15:09:14 2023 +0000 Work-around unexplained linger behaviour on MacOS --- java/org/apache/tomcat/util/net/AbstractEndpoint.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java index ac7ba21bb5..f86df63f6e 100644 --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java @@ -1083,7 +1083,10 @@ public abstract class AbstractEndpoint<S,U> { utmo = getSocketProperties().getUnlockTimeout(); } s.setSoTimeout(stmo); - s.setSoLinger(getSocketProperties().getSoLingerOn(),getSocketProperties().getSoLingerTime()); + // Newer MacOS versions (e.g. Ventura 13.2) appear to linger for ~1s on close when linger is disabled. + // That causes delays when running the unit tests. Explicitly enableing linger but with a timeout of + // zero seconds seems to fix the issue. + s.setSoLinger(true, 0); if (getLog().isDebugEnabled()) { getLog().debug("About to unlock socket for:" + unlockAddress); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org