Catch io exceptions and hide them unless debug is enabled
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 22 Mar 2007 22:05:22 +0000 (22:05 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 22 Mar 2007 22:05:22 +0000 (22:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@521493 13f79535-47bb-0310-9956-ffa450edef68

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

index c527bf3..474d550 100644 (file)
@@ -1476,9 +1476,12 @@ public class NioEndpoint {
                     else 
                         cancelledKey(sk,SocketStatus.STOP,false);
                 }
+            }catch ( IOException x ) {
+                if ( log.isDebugEnabled() ) log.warn("Unable to complete send file", x);
+                cancelledKey(sk,SocketStatus.ERROR,false);
             }catch ( Throwable t ) {
                 log.error("",t);
-                cancelledKey(sk, SocketStatus.ERROR);
+                cancelledKey(sk, SocketStatus.ERROR, false);
             }
         }
 
@@ -1549,6 +1552,7 @@ public class NioEndpoint {
             error = false;
             fairness = 0;
             lastRegistered = 0;
+            sendfileData = null;
         }
         
         public void reset() {
index 12c95b5..9bd7fd7 100644 (file)
@@ -18,6 +18,9 @@
   <subsection name="Catalina">
     <changelog>
       <add>
+        Added SENDFILE support for the NIO connector. (fhanik)
+      </add>
+      <add>
         Added support for shared thread pools by adding in the &lt;Executor&gt;
         element as a nested element to the &lt;Service&gt; element. (fhanik)
       </add>