cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with libcurl in multithreaded environnement and a slow connection˛

From: <satriani.joe_at_free.fr>
Date: Wed, 10 Jan 2007 00:18:12 +0100

Selon Daniel Stenberg <daniel_at_haxx.se>:

> On Tue, 9 Jan 2007, satriani.joe_at_free.fr wrote:
>
> > libcurl writes "can't connect to host" in the error buffer on 2/3 of sent
> > messages.
>
> What does that mean? That the POST data is already being sent when it returns
> with this error set? It seems very strange if so.

The POST data isn't sent at all. result of curl_easy_perform() is
CURLE_COULDNT_CONNECT. Next attempt with a same curl handle and a FRESH_CONNECT
of 0 has a better chance to succeed, but not with good probabilities.

>
> > my environnement is Linux Debian Stable (libcurl 7.13).
>
> That's a very old version. It would be a good idea to try a much newer
> version
> to see if you still experience problems.
I experience same trouble with the same code on a win32 platform and libcurl
7.15.
I remark that on slow connections when handles are used for a longer time than
ethernet, multithreading maybe involves the use of lock or mutex on a certain
ressource, or do i have to use curl_multi instead ?
Received on 2007-01-10