I'm having this issue if a connection timeout happens and libcurl try to 
connect again on another ip.

You can check the error by running the example provided in the uvbook: 
https://github.com/nikhilm/uvbook/blob/master/code/uvwget/main.c

For that, on the 
add_download<https://github.com/nikhilm/uvbook/blob/master/code/uvwget/main.c#L52>function,
 I've set the timeout to be low enough to create a timeout:
curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); 
curl_easy_setopt(handle, CURLOPT_URL, url); 
+ curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 2); 
+ curl_easy_setopt(handle, CURLOPT_TIMEOUT, 2);

Output:
>uvwget http://www.google.com:81
Added download http://www.google.com:81 -> 1.download 
* Rebuilt URL to: http://www.google.com:81/ 
* Hostname was NOT found in DNS cache 
*  Trying 200.149.119.118... 
* After 695ms connect time, move on! 
* connect to 200.149.119.118 port 81 failed: Timed out 
*  Trying 200.149.119.104... 
Assertion failed: ((handle)->flags & UV__HANDLE_CLOSING) == 0, file 
src\win\poll.c, line 190

This only happens on Windows. Can someone tell me what is going on here?

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to