Author: fhanik Date: Tue Feb 20 19:47:05 2007 New Revision: 509880 URL: http://svn.apache.org/viewvc?view=rev&rev=509880 Log: added in notes to myself about blocking the poller thread, that should be prohibited
Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 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/NioBlockingSelector.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?view=diff&rev=509880&r1=509879&r2=509880 ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Tue Feb 20 19:47:05 2007 @@ -68,6 +68,7 @@ att.startLatch(1); socket.getPoller().add(socket,SelectionKey.OP_WRITE); att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS); + att.resetLatch(); }catch (InterruptedException ignore) { } if ( att.getLatch() == null ) keycount = 1; @@ -124,6 +125,7 @@ att.startLatch(1); socket.getPoller().add(socket,SelectionKey.OP_READ); att.getLatch().await(readTimeout,TimeUnit.MILLISECONDS); + att.resetLatch(); }catch (InterruptedException ignore) { } if ( att.getLatch() == null ) keycount = 1; 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=509880&r1=509879&r2=509880 ============================================================================== --- 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 Tue Feb 20 19:47:05 2007 @@ -876,7 +876,6 @@ } } } - } @@ -1270,8 +1269,10 @@ processSocket(channel, SocketStatus.DISCONNECT); } else if ( attachment.getLatch() != null ) { attachment.getLatch().countDown(); - attachment.resetLatch(); } else { + //this sucker here dead locks with the count down latch + //since this call is blocking if no threads are available. + //TODO: FIXME BIG TIME boolean close = (!processSocket(channel)); if ( close ) { channel.close(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]