On 8/3/06, Gonzalo Paniagua Javier <[EMAIL PROTECTED]> wrote:
> > It reports that the socket is readable.
>
> And when you read it, it returns EOF?

Yes, it returns a 0.

Are you on Mac OS X by any chance?

I'm seeing this same thing with serf via apr_pollset_poll().

select() returns 5 (POLLIN & POLLOUT I think) - but by this point, the
local end has already received a remote FIN.

My repro case (ra_serf / serf / apr trunk) is:

% svn co -r300000 http://svn.apache.org/repos/asf/httpd/httpd/trunk
% svn up -rHEAD trunk

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

Reply via email to