curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: bind address lockup

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 27 Jun 2019 17:04:08 +0200 (CEST)

On Thu, 27 Jun 2019, Robert NEMKIN via curl-library wrote:

> I don't know if setsockopt bind address is thread-safe?

Assuming you speak of Linux, I certainly presume bind() is thread-safe. But
your way of saying this makes me curious. Why do you call it setsockopt bind
address? Where exactly does it hang? And for how long?

> Maybe I can use some workaround? E.g. download a little testfile sequential
> to do the bindaddress serialized with keepalive, then start the
> multithreaded download?

You could add one transfer at a time and only start the next once the previous
has started to get data as then you know they don't do bind() at the same
time. But I wouldn't feel entirely safe with that since then we don't know for
sure where the problem is or that this is actually a working fix or just
accidentally working...

-- 
  / daniel.haxx.se | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-06-27