From: fhanik Date: Wed, 21 Feb 2007 16:52:22 +0000 (+0000) Subject: Accept doesn't need a worker thread, the operations are non blocking X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c333f85fa853d5ec5e1ae6b0795c86b3f868f814;p=tomcat7.0 Accept doesn't need a worker thread, the operations are non blocking git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@510098 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 453e0523a..7fc88c8c7 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1033,7 +1033,18 @@ public class NioEndpoint { // Hand this socket off to an appropriate processor //TODO FIXME - this is currently a blocking call, meaning we will be blocking //further accepts until there is a thread available. - if ( running && (!paused) && socket != null ) processSocket(socket); + if ( running && (!paused) && socket != null ) { + //processSocket(socket); + if (!setSocketOptions(socket)) { + try { + socket.socket().close(); + socket.close(); + } catch (IOException ix) { + if (log.isDebugEnabled()) + log.debug("", ix); + } + } + } } catch (Throwable t) { log.error(sm.getString("endpoint.accept.fail"), t); }