From 312222e2b74aac76d04509592b7310e909e6d133 Mon Sep 17 00:00:00 2001 From: fhanik Date: Fri, 4 Apr 2008 19:48:34 +0000 Subject: [PATCH] fix sendfile, incorrect if else statements 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.11.0