{"thread":{"id":"2185","subject":"[PATCH 3/3] Allow running requests to finish after a pull error","startedAt":"2005-10-21T19:06:27Z","lastAt":"2005-10-21T19:06:27Z","messageCount":1,"participants":["Nick Hengeveld"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"10433","messageId":"20051021190627.GG6160@reactrix.com","threadId":"2185","inReplyTo":null,"subject":"[PATCH 3/3] Allow running requests to finish after a pull error","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2005-10-21T19:06:27Z","receivedAt":"2005-10-21T19:06:27Z","isPatch":true,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"Allow running requests to finish after a pull error\n\nSigned-off-by: Nick Hengeveld <nickh@reactrix.com>\n\n\n---\n\n http-fetch.c |   15 +++++++++++++--\n 1 files changed, 13 insertions(+), 2 deletions(-)\n\napplies-to: 3f355bb154eb7b68de698d1e2692615820445cae\n584ac10ab8c1f869ea475246012683db95c9088c\ndiff --git a/http-fetch.c b/http-fetch.c\nindex ed1053a..1ee1df2 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -1226,6 +1226,8 @@ int main(int argc, char **argv)\n \tstruct active_request_slot *slot;\n \tchar *low_speed_limit;\n \tchar *low_speed_time;\n+\tchar *wait_url;\n+\tint rc = 0;\n \n \twhile (arg < argc && argv[arg][0] == '-') {\n \t\tif (argv[arg][1] == 't') {\n@@ -1313,7 +1315,7 @@ int main(int argc, char **argv)\n \talt->next = NULL;\n \n \tif (pull(commit_id))\n-\t\treturn 1;\n+\t\trc = 1;\n \n \tcurl_slist_free_all(pragma_header);\n \tcurl_slist_free_all(no_pragma_header);\n@@ -1323,6 +1325,15 @@ int main(int argc, char **argv)\n #endif\n \tslot = active_queue_head;\n \twhile (slot != NULL) {\n+\t\tif (slot->in_use) {\n+\t\t\tif (get_verbosely) {\n+\t\t\t\tcurl_easy_getinfo(slot->curl,\n+\t\t\t\t\t\t  CURLINFO_EFFECTIVE_URL,\n+\t\t\t\t\t\t  &wait_url);\n+\t\t\t\tfprintf(stderr, \"Waiting for %s\\n\", wait_url);\n+\t\t\t}\n+\t\t\trun_active_slot(slot);\n+\t\t}\n \t\tif (slot->curl != NULL)\n \t\t\tcurl_easy_cleanup(slot->curl);\n \t\tslot = slot->next;\n@@ -1331,5 +1342,5 @@ int main(int argc, char **argv)\n \tcurl_multi_cleanup(curlm);\n #endif\n \tcurl_global_cleanup();\n-\treturn 0;\n+\treturn rc;\n }\n---\n0.99.8.GIT\n"}]}