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
commit af0334e74aa920332bc5d92187db97b6094ff49a Author: lihan <aooo...@gmail.com> AuthorDate: Mon Jul 18 12:52:11 2022 +0800 Duplicate accept checks are not required in unix domain socket mode --- java/org/apache/tomcat/util/net/NioEndpoint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index ae8d64e6cd..596feb4b9f 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -519,8 +519,8 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel> protected SocketChannel serverSocketAccept() throws Exception { SocketChannel result = serverSock.accept(); - // Bug does not affect Windows. Skip the check on that platform. - if (!JrePlatform.IS_WINDOWS) { + // Bug does not affect Windows platform and Unix Domain Socket. Skip the check. + if (!JrePlatform.IS_WINDOWS && getUnixDomainSocketPath() == null) { SocketAddress currentRemoteAddress = result.getRemoteAddress(); long currentNanoTime = System.nanoTime(); if (currentRemoteAddress.equals(previousAcceptedSocketRemoteAddress) && --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org