Author: fhanik
Date: Mon Oct 30 07:53:19 2006
New Revision: 469168

URL: http://svn.apache.org/viewvc?view=rev&rev=469168
Log:
If the key is null, channel is closed,not sure this is the correct fix, since 
the key potentially had an attachment this could lead to NIO mem leak, must 
track down how this happens

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=469168&r1=469167&r2=469168
==============================================================================
--- 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 Mon 
Oct 30 07:53:19 2006
@@ -1432,13 +1432,11 @@
                             
                         }
                     } else {
-                        
                         NioChannel socket = (NioChannel)channel;
-
                         SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
                         int handshake = -1;
                         try {
-                            handshake = socket.handshake(key.isReadable(), 
key.isWritable());
+                            handshake = 
key!=null?socket.handshake(key.isReadable(), key.isWritable()):-1;
                         }catch ( IOException x ) {
                             handshake = -1;
                             if ( log.isDebugEnabled() ) log.debug("Error 
during SSL handshake",x);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to