cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Curllib on vista?

From: Guenter Knauf <eflash_at_gmx.net>
Date: Thu, 6 Mar 2008 00:01:10 +0100

Hi Jared,
> On XP: during an active connection (in the middle of a data transfer),
> if the cable is pulled libcurl detects a broken connection and exits
> gracefully. Libcurl properly detects the broken connection because the
> behavior of select on XP is as it is documented
> (http://msdn2.microsoft.com/en-us/library/ms740141(VS.85).aspx).

> On Vista: During an active connection (in the middle of a data
> transfer), if the cable is pulled libcurl does not detect the broken
> connection. The result of this is that libcurl sits in an infinite loop
> (the select call repeatedly returns 0, for timeout, which causes libcurl
> to keep checking). Plugging the cable back in has no effect on this
> loop. I let it run overnight and it never returns. I was not using
> those LOW_SPEED options (which I will look into doing), but aside from
> setting those, is an infinite loop expected behavior?

> I have seen this behavior on 3 vista machines, 2 running business and 1
> running home premium. Thanks for all your responses thus far.
this made me some curious, and I also made some tests. So I took a CD iso
of ~ 450 MB to have something big, and started.....
first I tested with wireless:
- WinXP => transfer started, downloaded ~20MB, then switched off wireless -> transfer aborted.
- Vista => transfer started, downloaded ~20MB, then switched off wireless -> transfer keeps open;
  transfer time constantly increases...; after about 3 minutes I switched wireless on again,
  and transfer continued!

then I tested with cable 10 MB (sorry, had no 100MB at this place...):
- WinXP => transfer started, downloaded ~20MB, then disconnected cable -> transfer aborted.
- Vista => transfer started, downloaded ~20MB, then disconnected cable -> transfer keeps open;
  transfer time constantly increases...; after about 3 minutes I reconnected cable again,
  and transfer continued after ~90 sec!

This was tested with Laptops running WinXP Home / Vista Home Basic.

So I can confirm that cURL keeps hanging in an infinite loop, but I other than what you describe
if I re-connect the network again the download continues after a ~90 secs; so the new Vista behaviour
is from my point of view a better one; at least with wireless it can happen sometimes that the network
gets temporarily disconnected, and then the infinite loop is better than the abort I see with XP;
at least as long as the transfer resumes which it did for me; I did repeat this test 3 times, and
every time the resume worked fine with both cable and wireless.

Guenter.
Received on 2008-03-06