cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Couldn't Connect Error - Address already in use

From: Alfred Gebert <alfred.gebert_at_gmail.com>
Date: Wed, 7 Jul 2010 15:49:53 +0200

On Wed, Jul 7, 2010 at 3:08 PM, Adam Kellas <Adam.Kellas_at_gmail.com> wrote:
> On 7/7/2010 6:21 AM, Alfred Gebert wrote:
>>
>> So in my opinion there is a limitation of libcurl running on Windows XP.
>
> This may be merely an artifact of the test case, and your conclusion about
> Windows XP seems correct, but I don't think you should need to create and
> destroy the handle each time through the loop, and this may contribute to
> some form of resource exhaustion. Any reason not to hoist the
> curl_easy_init/curl_easy_cleanup calls out of the loop?
>

If I put the curl_easy_init/curl_easy_cleanup calls out of the for
loop then it works.
Thank you.

At least this is a workaround. Perhaps I can modify my real codebase too.

> AK
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-07