From: fhanik Date: Fri, 4 Apr 2008 19:48:34 +0000 (+0000) Subject: fix sendfile, incorrect if else statements X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=312222e2b74aac76d04509592b7310e909e6d133;p=tomcat7.0 fix sendfile, incorrect if else statements git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@644858 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 d213fb9fb..bd9166697 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -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); }