From c982647310fc5acd0bd6ebc408e70470447b387f Mon Sep 17 00:00:00 2001 From: Nick Hengeveld Date: Wed, 15 Mar 2006 08:59:52 -0800 Subject: [PATCH] Fix broken slot reuse when fetching alternates When fetching alternates, http-fetch may reuse the slot to fetch non-http alternates if http-alternates does not exist. When doing so, it now needs to update the slot's finished status so run_active_slot waits for the non-http alternates request to finish. Signed-off-by: Nick Hengeveld Signed-off-by: Junio C Hamano --- http-fetch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http-fetch.c b/http-fetch.c index 8fd9de08..7de818b1 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -468,9 +468,13 @@ static void process_alternates_response(void *callback_data) alt_req->url); active_requests++; slot->in_use = 1; + if (slot->finished != NULL) + (*slot->finished) = 0; if (!start_active_slot(slot)) { got_alternates = -1; slot->in_use = 0; + if (slot->finished != NULL) + (*slot->finished) = 1; } return; } -- 2.11.0