cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl cannot reconnect after some time

From: Erik Torres Serrano <etserrano_at_yahoo.com>
Date: Wed, 17 Jun 2009 01:41:13 -0700 (PDT)

Hi, thanks a lot for your hint Daniel. Finally I've found what the problem is. I have the following code:

FILE *nullFile = fopen("/dev/null", "w");
curl_easy_setopt(curl, CURLOPT_STDERR, nullFile);

And I forgot to call close() for the stderr file handle.

Regards,

Erik

--- On Fri, 6/12/09, Daniel Stenberg <daniel_at_haxx.se> wrote:

> From: Daniel Stenberg <daniel_at_haxx.se>
> Subject: Re: libcurl cannot reconnect after some time
> To: "libcurl development" <curl-library_at_cool.haxx.se>
> Date: Friday, June 12, 2009, 5:38 PM
> On Thu, 11 Jun 2009, Erik Torres
> Serrano wrote:
>
> > After this time, libcurl simply lost the connection to
> the server and can't reconnect again, regardless of the time
> you wait. Even more, when I use the server name instead of
> the server IP to connect the server, after this time libcurl
> can't resolve the address for the server. I haven't found
> anything suspect neither in the syslog nor in the Apache
> logs. Does anybody can give me a hint?
>
> I suggest using strace or similar to see what exactly that
> fails. It sounds like a possible socket/file descriptor leak
> to me.
>
> --
> / daniel.haxx.se
>

      
Received on 2009-06-17