mirror of
https://github.com/moparisthebest/curl
synced 2025-01-08 12:28:06 -05:00
multi use: call multi_perform even on select() timeouts
This commit is contained in:
parent
909e711e74
commit
542318b113
@ -180,12 +180,9 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
/* timeout or readable/writable sockets */
|
||||||
|
curl_multi_perform(multi_handle, &file->still_running);
|
||||||
default:
|
break;
|
||||||
/* timeout or readable/writable sockets */
|
|
||||||
curl_multi_perform(multi_handle, &file->still_running);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} while(file->still_running && (file->buffer_pos < want));
|
} while(file->still_running && (file->buffer_pos < want));
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -101,12 +101,8 @@ int main(int argc, char **argv)
|
|||||||
case -1:
|
case -1:
|
||||||
/* select error */
|
/* select error */
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0: /* timeout */
|
||||||
/* timeout, do something else */
|
default: /* action */
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* one or more of curl's file descriptors say there's data to read
|
|
||||||
or write */
|
|
||||||
curl_multi_perform(multi_handle, &still_running);
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,6 @@ int main(int argc, char *argv[])
|
|||||||
/* select error */
|
/* select error */
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
printf("timeout!\n");
|
|
||||||
default:
|
default:
|
||||||
/* timeout or readable/writable sockets */
|
/* timeout or readable/writable sockets */
|
||||||
printf("perform!\n");
|
printf("perform!\n");
|
||||||
|
@ -174,12 +174,8 @@ int main(void)
|
|||||||
case -1:
|
case -1:
|
||||||
/* select error */
|
/* select error */
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0: /* timeout */
|
||||||
/* timeout, do something else */
|
default: /* action */
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* one or more of curl's file descriptors say there's data to read
|
|
||||||
or write */
|
|
||||||
curl_multi_perform(mcurl, &still_running);
|
curl_multi_perform(mcurl, &still_running);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user