apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [Fwd: Re: How to detect is the socket is still open]
Date Wed, 16 Aug 2006 07:55:44 GMT
On Wed, Aug 16, 2006 at 12:01:34AM -0700, Justin Erenkrantz wrote:
> On that second update, there are often 15+ second pauses from svn.a.o
> that causes httpd to close the connection as its idle.  But, when we
> want to reuse that connection later, serf does a pollset_poll() and it
> says that the connection is good to go.  But, it's not and we get an 0
> from read().  This leads to a 'Premature EOF seen from server' error.
> 
> Shouldn't select() be returning POLLERR in this case?  Or, am I nuts?
> Are we hitting some type of stupidity in Darwin?  -- justin

POLLERR would only be set for an RST and "exceptional conditions"; the
same applies to select()+the exceptfds array AFAIK.

There is some inconsistency with handling FIN and sockets across
platforms: http://www.greenend.org.uk/rjk/2001/06/poll.html but yes
you'd generally expect POLLIN for "you can read EOF".

joe

Mime
View raw message