fix sendfile, incorrect if else statements
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 4 Apr 2008 19:48:34 +0000 (19:48 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 4 Apr 2008 19:48:34 +0000 (19:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@644858 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/NioEndpoint.java

index d213fb9..bd91666 100644 (file)
@@ -1607,10 +1607,11 @@ public class NioEndpoint {
                 }
                 if ( sd.length <= 0 ) {
                     attachment.setSendfileData(null);
-                    if ( sd.keepAlive ) 
+                    if ( sd.keepAlive ) {
                         if (reg) reg(sk,attachment,SelectionKey.OP_READ);
-                    else 
+                    } else {
                         cancelledKey(sk,SocketStatus.STOP,false);
+                    }
                 } else if ( attachment.interestOps() == 0 && reg ) {
                     reg(sk,attachment,SelectionKey.OP_WRITE);
                 }