tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r528528 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Date Fri, 13 Apr 2007 15:39:45 GMT
Author: fhanik
Date: Fri Apr 13 08:39:44 2007
New Revision: 528528

URL: http://svn.apache.org/viewvc?view=rev&rev=528528
Log:
Prevent NPE on a key that was cancelled by the poller

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=528528&r1=528527&r2=528528
==============================================================================
--- 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 Fri Apr 13 08:39:44
2007
@@ -1862,7 +1862,7 @@
                         SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector());
                         int handshake = -1;
                         try {
-                            handshake = socket.handshake(key.isReadable(), key.isWritable());
+                            if (key!=null) handshake = socket.handshake(key.isReadable(),
key.isWritable());
                         }catch ( IOException x ) {
                             handshake = -1;
                             if ( log.isDebugEnabled() ) log.debug("Error during SSL handshake",x);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message