curl-library
RE: libcurl + libuv problem on Windows 7 x64
Date: Sun, 11 May 2014 14:53:45 +0000
I just tried the example provided about using libuv with curl (http://curl.haxx.se/libcurl/c/multi-uv.html), and it does have the same issue.
On the add_download 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);
And it will fail with the same error I'm having.
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 ..\..\..\..\
deps\libuv\src\win\poll.c, line 190
I don't know for sure what is going on, mostly because I'm a noob, but from what I can understand, looks like libuv is trying to access the socket that was closed by libcurl on the trynextip function (https://github.com/bagder/curl/blob/master/lib/connect.c#L584).
And again, here the socket callback is called on the inverted order as on my example:
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.108...
handle_socket called with action: 2 And socketp: 00000000
* After 937ms connect time, move on!
* connect to 200.149.119.108 port 81 failed: Timed out
* Trying 200.149.119.84...
handle_socket called with action: 4 And socketp: 00844B30
handle_socket called with action: 2 And socketp: 00000000
Assertion failed: ((handle)->flags & UV__HANDLE_CLOSING) == 0, file ..\..\..\..\
deps\libuv\src\win\poll.c, line 190
I will post this on libuv mailing list too.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-11