Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 27621 invoked from network); 23 Nov 2005 14:54:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Nov 2005 14:54:32 -0000 Received: (qmail 48763 invoked by uid 500); 23 Nov 2005 14:54:24 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 48530 invoked by uid 500); 23 Nov 2005 14:54:22 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 48512 invoked by uid 99); 23 Nov 2005 14:54:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 06:54:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [207.245.72.101] (HELO mail.liminalflux.net) (207.245.72.101) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 06:55:54 -0800 Received: from localhost (neskaya.liminalflux.net [216.158.52.158]) by mail.liminalflux.net (Postfix) with ESMTP id B85C13F6F0 for ; Wed, 23 Nov 2005 09:53:57 -0500 (EST) Received: from mail.liminalflux.net ([216.158.52.158]) by localhost (neskaya.liminalflux.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15142-08 for ; Wed, 23 Nov 2005 09:53:43 -0500 (EST) Received: from [10.1.0.167] (firewall.meritind.com [141.151.66.54]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.liminalflux.net (Postfix) with ESMTP id 2C8903F6EF for ; Wed, 23 Nov 2005 09:53:42 -0500 (EST) From: Malcolm J Harwood To: modperl@perl.apache.org Subject: mp2 broken connection detection Date: Wed, 23 Nov 2005 09:53:40 -0500 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511230953.40829.mjhlist-modperl@liminalflux.net> X-Virus-Scanned: by amavisd-new at liminalflux.net X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The cookbook (recipe 4.9) claims that $c->aborted is only true after you've actually sent data to the client and flushed the buffers. For testing if the client is still connected, it recommends doing something like: $c = Apache->request->connection; return if ($c->aborted); $s = IO::Select->new($c->fileno); return if ($s->can_read(0)); return 1; Which presumably works fine with mp1, but doesn't at all with mp2. $c->fileno no longer exists the closest seems to be $c->client_socket but it's not obvious from the documentation how one would check that. Is it even needed, or does $c->aborted check whether the socket is open in mp2? -- "One has no desire to be devoured by alien monstrosities, even in the cause of political progress". - Kalik, Dr Who: Carnival of Monsters