From: markt Date: Tue, 12 Jul 2011 12:51:35 +0000 (+0000) Subject: Socket has been closed, return false so an attempt is not made to re-use the socket X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f0c4dd1e308cc605e0fb0ca66c7ff145817303fd;p=tomcat7.0 Socket has been closed, return false so an attempt is not made to re-use the socket git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1145571 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 2f5344f75..8cd7c06bf 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -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()) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a0fa744c6..d82ee63ec 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -124,6 +124,10 @@ Protect against infinite loops in the HTTP NIO connector if sendfile is configured to send more data than is available in the file. (markt) + + Prevent NPEs when a socket is closed in non-error conditions after + sendfile processing when using the HTTP NIO connector. (markt) +