Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 13806 invoked by uid 6000); 2 Sep 1998 23:35:27 -0000 Received: (qmail 13798 invoked from network); 2 Sep 1998 23:35:25 -0000 Received: from valis.worldgate.com (marcs@198.161.84.2) by taz.hyperreal.org with SMTP; 2 Sep 1998 23:35:25 -0000 Received: from localhost (marcs@localhost) by valis.worldgate.com (8.9.1a/8.9.1) with SMTP id RAA03709 for ; Wed, 2 Sep 1998 17:35:24 -0600 (MDT) Date: Wed, 2 Sep 1998 17:35:24 -0600 (MDT) From: Marc Slemko To: new-httpd@apache.org Subject: Re: client connection questions In-Reply-To: <19980902232439.9012.qmail@hyperreal.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Wed, 2 Sep 1998, Doug MacEachern wrote: > At 03:15 PM 9/2/98 -0600, Marc Slemko wrote: > >On Wed, 2 Sep 1998, Doug MacEachern wrote: > > > >> A few questions: > >> > >> If ap_rwrite/ap_bwrite returns -1, does that *always* mean the connection > >> is broken? > > > >It means you can't write to it any more and shouldn't retry AFAIK. > > That's what I thought, but would like to be 100% sure. For quite some > time, mod_perl wasn't even checking if the return value from rwrite was < > 0. After that check when in, a user claimed some of his scripts were not > printing everything they should. I put the check for > if(r->connection->aborted) break; > else continue; > Which, now I understand would always continue. > > hmm, ap_send_fd_length() checks errno: > > else if (w < 0) { > if (r->connection->aborted) > break; > else if (errno == EAGAIN) > continue; > > What would cause errno == EAGAIN? Is this something all modules should check? EAGAIN is what you get if you try to do something on a nonblocking socket that would block. Not sure why it is used there, you shouldn't have to worry about it that I cna think of. > > >> > >> r->connection->aborted is only set if a soft_timeout happens, why not with > >> hard_timeout too? > > > >Because if a hard timeout happens, your code will never be in a position > >to see the r->connection->aborted. > > Right, I should have known that by now. But, you could see in a logger or > register_cleanup() function. True.