cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: Multi-threaded calls

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Nov 2009 10:58:44 +0100 (CET)

On Tue, 17 Nov 2009, Zoltan Bencik wrote:

> Then, I spawned 2 threads, each has it's own easy handle, and followed the
> instructions
> from http://curl.haxx.se/libcurl/c/libcurl-tutorial.html#Multi-threading
> So, I've set CURLOPT_NOSIGNAL to 1 on all handles

...

> and set CURLOPT_DNS_USE_GLOBAL_CACHE to 0 (because without disable global
> cache I was receiving curl error code 6, dns problems).

This doesn't make any sense to me. CURLOPT_DNS_USE_GLOBAL_CACHE defaults to
zero so you setting it to zero or not setting it at all will have the same
effect. libcurl only uses a global dns cache if you explicitly tell it to. Any
other way would cause serious breakage when used by apps all over.

> Now, my first thread fails to connect to the server, returning error code
> 7(CURLE_COULDNT_CONNECT), the second thread doesn't have any problems and
> works as it should.

That indiciates the problem is already before SSL (NSS) gets involved.

What Linux version and platform and libc is this running on? It seems "fishy"
to me.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-17

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET