Re: [PATCH 3/9] http-fetch: Abort requests for objects which arrived in packs
- From
- Mark Wooding <mdw@distorted.org.uk>
- Date
- Feb 1, 2006, 17:23 UTC
- Message-ID
- <slrndu1rk9.2i8.mdw@metalzone.distorted.org.uk>
- In-Reply-To
- <20060201171225.GI3873@reactrix.com>
Nick Hengeveld <nickh@reactrix.com> wrote:
> Does it make sense to call curl_easy_cleanup here? This will close > persistent server connections and cause another connection startup if > the slot is reused.
I'm by no means a Curl expert. But I scoured the docs for another way of interrupting the current fetch and I couldn't find anything. It really didn't seem like a good idea to leave the handle as it was, having (possibly) half-fetched a thing we weren't actually interested in -- that way lies confusion.
Besides, in practice, what's happened is that the object we asked for is in a pack which we've just collected. Unless the upstream repository hasn't been git-prune-packed, our fetch is going to fail with a 404 anyway, at which point Curl /will/ close the connection and make another one next time. So, in real life, it makes no difference.
-- [mdw]