Author: markt
Date: Thu Jan  5 15:02:25 2017
New Revision: 1777469

URL: http://svn.apache.org/viewvc?rev=1777469&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=60409
When unable to complete sendfile request, ensure the Processor will be added to 
the cache only once.

Modified:
    tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1777469&r1=1777468&r2=1777469&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Jan  5 15:02:25 2017
@@ -1245,11 +1245,15 @@ public class NioEndpoint extends Abstrac
                 }
             }catch ( IOException x ) {
                 if ( log.isDebugEnabled() ) log.debug("Unable to complete 
sendfile request:", x);
-                cancelledKey(sk,SocketStatus.ERROR);
+                if (!calledByProcessor) {
+                    cancelledKey(sk,SocketStatus.ERROR);
+                }
                 return SendfileState.ERROR;
             }catch ( Throwable t ) {
                 log.error("",t);
-                cancelledKey(sk, SocketStatus.ERROR);
+                if (!calledByProcessor) {
+                    cancelledKey(sk, SocketStatus.ERROR);
+                }
                 return SendfileState.ERROR;
             }
         }

Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1777469&r1=1777468&r2=1777469&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Thu Jan  5 15:02:25 2017
@@ -140,6 +140,10 @@
         when configured with an address of <code>0.0.0.0</code> or
         <code>::</code>. (markt)
       </fix>
+      <fix>
+        <bug>60409</bug>: When unable to complete sendfile request, ensure the
+        Processor will be added to the cache only once. (markt/violetagg)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">



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

Reply via email to