mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 22:10:01 -04:00
patch js in a better way, fix event loop logic
This commit is contained in:
parent
4af7f6a4a0
commit
fc32c7c1fb
8 changed files with 57 additions and 21 deletions
|
@ -50,14 +50,6 @@ void tick_request() {
|
|||
|
||||
mc = curl_multi_perform(multi_handle, &request_active);
|
||||
|
||||
if(!mc)
|
||||
mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
|
||||
|
||||
if(mc) {
|
||||
fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mc);
|
||||
return;
|
||||
}
|
||||
|
||||
int msgq = 0;
|
||||
curl_msg = curl_multi_info_read(multi_handle, &msgq);
|
||||
if (curl_msg && curl_msg->msg == CURLMSG_DONE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue