summaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorNick Hengeveld <nickh@reactrix.com>2005-10-21 12:06:27 -0700
committerJunio C Hamano <junkio@cox.net>2005-10-21 19:20:18 -0700
commit7b9ae53ea3680f5b0d17a2dd40b39a17f1fcc5cf (patch)
tree4305aa7b64c15f454ac3b97d9d0dfb21ccf22a68 /http-fetch.c
parentf7eb290fa0620cebc033e80216c74ab9d1573a6c (diff)
downloadgit-7b9ae53ea3680f5b0d17a2dd40b39a17f1fcc5cf.tar.gz
[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>
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/http-fetch.c b/http-fetch.c
index ed1053ade3..1ee1df20d6 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1226,6 +1226,8 @@ int main(int argc, char **argv)
struct active_request_slot *slot;
char *low_speed_limit;
char *low_speed_time;
+ char *wait_url;
+ int rc = 0;
while (arg < argc && argv[arg][0] == '-') {
if (argv[arg][1] == 't') {
@@ -1313,7 +1315,7 @@ int main(int argc, char **argv)
alt->next = NULL;
if (pull(commit_id))
- return 1;
+ rc = 1;
curl_slist_free_all(pragma_header);
curl_slist_free_all(no_pragma_header);
@@ -1323,6 +1325,15 @@ int main(int argc, char **argv)
#endif
slot = active_queue_head;
while (slot != NULL) {
+ if (slot->in_use) {
+ if (get_verbosely) {
+ curl_easy_getinfo(slot->curl,
+ CURLINFO_EFFECTIVE_URL,
+ &wait_url);
+ fprintf(stderr, "Waiting for %s\n", wait_url);
+ }
+ run_active_slot(slot);
+ }
if (slot->curl != NULL)
curl_easy_cleanup(slot->curl);
slot = slot->next;
@@ -1331,5 +1342,5 @@ int main(int argc, char **argv)
curl_multi_cleanup(curlm);
#endif
curl_global_cleanup();
- return 0;
+ return rc;
}