[PATCH 3/3] Allow running requests to finish after a pull error
Allow running requests to finish after a pull error Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nick Hengeveld committed
Oct 21, 2005 at 12:06 UTC
7b9ae53ea3680f5b0d17a2dd40b39a17f1fcc5cf
1 file changed
+13
-2
http-fetch.c
+13
-2
@@ -1226,6 +1226,8 @@ int main(int argc, char **argv)
1226
struct active_request_slot *slot;
1227
char *low_speed_limit;
1228
char *low_speed_time;
1229
+ char *wait_url;
1230
+ int rc = 0;
1231
1232
while (arg < argc && argv[arg][0] == '-') {
1233
if (argv[arg][1] == 't') {
@@ -1313,7 +1315,7 @@ int main(int argc, char **argv)
1315
alt->next = NULL;
1316
1317
if (pull(commit_id))
1316
- return 1;
1318
+ rc = 1;
1319
1320
curl_slist_free_all(pragma_header);
1321
curl_slist_free_all(no_pragma_header);
@@ -1323,6 +1325,15 @@ int main(int argc, char **argv)
1325
#endif
1326
slot = active_queue_head;
1327
while (slot != NULL) {
1328
+ if (slot->in_use) {
1329
+ if (get_verbosely) {
1330
+ curl_easy_getinfo(slot->curl,
1331
+ CURLINFO_EFFECTIVE_URL,
1332
+ &wait_url);
1333
+ fprintf(stderr, "Waiting for %s\n", wait_url);
1334
+ }
1335
+ run_active_slot(slot);
1336
+ }
1337
if (slot->curl != NULL)
1338
curl_easy_cleanup(slot->curl);
1339
slot = slot->next;
@@ -1331,5 +1342,5 @@ int main(int argc, char **argv)
1342
curl_multi_cleanup(curlm);
1343
#endif
1344
curl_global_cleanup();
1334
- return 0;
1345
+ return rc;
1346
}