httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: client connection questions
Date Wed, 02 Sep 1998 16:25:29 GMT
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)
                else if (errno == EAGAIN)

What would cause errno == EAGAIN?  Is this something all modules should check?

>> 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.  


View raw message