Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC6C8DF87 for ; Thu, 25 Oct 2012 22:13:20 +0000 (UTC) Received: (qmail 16174 invoked by uid 500); 25 Oct 2012 22:13:19 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 16109 invoked by uid 500); 25 Oct 2012 22:13:19 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 16100 invoked by uid 99); 25 Oct 2012 22:13:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 22:13:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 22:13:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 823E023888E3 for ; Thu, 25 Oct 2012 22:12:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1402345 - /tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Date: Thu, 25 Oct 2012 22:12:33 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121025221233.823E023888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Thu Oct 25 22:12:33 2012 New Revision: 1402345 URL: http://svn.apache.org/viewvc?rev=1402345&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54022 Ensure Comet END event is triggered on client disconnect with APR/native on Windows Vista/2k8 or later. Patch provided by Douglas Beachy. Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1402345&r1=1402344&r2=1402345&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Thu Oct 25 22:12:33 2012 @@ -604,9 +604,13 @@ public abstract class AbstractProtocol i SocketState state = SocketState.CLOSED; do { - if (status == SocketStatus.DISCONNECT) { - //do nothing here, just wait for it to get recycled - } else if (processor.isAsync() || state == SocketState.ASYNC_END) { + if (status == SocketStatus.DISCONNECT && + !processor.isComet()) { + // Do nothing here, just wait for it to get recycled + // Don't do this for Comet we need to generate an end + // event (see BZ 54022) + } else if (processor.isAsync() || + state == SocketState.ASYNC_END) { state = processor.asyncDispatch(status); } else if (processor.isComet()) { state = processor.event(status); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org