[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Serf gets stuck on ECONNREFUSED on Windows

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: Thu, 26 May 2011 22:39:51 -1000

On Tue, May 24, 2011 at 3:10 PM, Justin Erenkrantz
<justin_at_erenkrantz.com> wrote:
>> Either Serf should detect the right error, or Apr should implement a real
>> poll handler on Windows (available since Windows Vista) which should provide
>> more error information.

Well...that's exactly what APR 1.4.x did - but WSAPoll() doesn't seem
to allow for reporting non-blocking connect failures. There are
plenty of MSDN forum posts about this not working. I managed to get a
VS2008 build env up on Windows 7. When I connect to a non-existent
port, nothing ever gets reported back from the apr_pollset_poll()
call. The connect() call (correctly) returns EINPROGRESS, so serf has
no way of knowing anything is wrong.

I've posted separately to the APR list - this is an APR issue and is a
regression only in APR 1.4.x+ (which added WSAPoll() support) - not a
Serf issue. Serf is asking for all of the correct flags, but Windows
Vista+ has no way of indicating that the connect() failed via this new
interface. (As such, this is a new issue - APR 1.3.x and earlier
wouldn't have had this issue as they use select().)

For older Windows platforms using select(), the fix I committed
earlier should still work....but, I'll still try to confirm locally.
-- justin
Received on 2011-05-27 10:40:25 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.