This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new a749447043 Work-around unexplained linger behaviour on MacOS
a749447043 is described below
commit a74944704337fe1402e3b25241565fe9b8aaef97
Author: Mark Thomas <[email protected]>
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 799f5460fe..ee91fd7121 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -1187,7 +1187,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: [email protected]
For additional commands, e-mail: [email protected]