Socket has been closed, return false so an attempt is not made to re-use the socket
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 12 Jul 2011 12:51:35 +0000 (12:51 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 12 Jul 2011 12:51:35 +0000 (12:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1145571 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/NioEndpoint.java
webapps/docs/changelog.xml

index 2f5344f..8cd7c06 100644 (file)
@@ -1271,6 +1271,7 @@ public class NioEndpoint extends AbstractEndpoint {
                             log.debug("Send file connection is being closed");
                         }
                         cancelledKey(sk,SocketStatus.STOP,false);
+                        return false;
                     }
                 } else if ( attachment.interestOps() == 0 && reg ) {
                     if (log.isDebugEnabled()) {
index a0fa744..d82ee63 100644 (file)
         Protect against infinite loops in the HTTP NIO connector if sendfile is
         configured to send more data than is available in the file. (markt)
       </fix>
+      <fix>
+        Prevent NPEs when a socket is closed in non-error conditions after
+        sendfile processing when using the HTTP NIO connector. (markt) 
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">