You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2007/02/21 17:52:23 UTC
svn commit: r510098 -
/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Author: fhanik
Date: Wed Feb 21 08:52:22 2007
New Revision: 510098
URL: http://svn.apache.org/viewvc?view=rev&rev=510098
Log:
Accept doesn't need a worker thread, the operations are non blocking
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=510098&r1=510097&r2=510098
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Feb 21 08:52:22 2007
@@ -1033,7 +1033,18 @@
// 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);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org