Re: [PATCH 4/3] http: check curl_multi_remove_handle error code
- From
- Eric Wong <e@80x24.org>
- Date
- Sep 21, 2016, 22:29 UTC
- Message-ID
- <20160921222959.GA4781@whir>
- In-Reply-To
- <20160921222208.ccgnpgx3gcvbjpfm@sigill.intra.peff.net>
Jeff King <peff@peff.net> wrote:
Show 19 quoted lines
> On Wed, Sep 21, 2016 at 09:46:23PM +0000, Eric Wong wrote:
>
> > -----------8<-----------
> > Subject: [PATCH] http: check curl_multi_remove_handle error code
> >
> > This should help detect bugs in future changes. While we're at
> > it, fix a (probably innocuous) bug in our http_cleanup function
> > for users of older curl.
> >
> > curl_multi_remove_handle was not idempotent until curl 7.33.0
> > with commit 84f3b3dd448399f9548468676e1bd1475dba8de5
> > ("curl_multi_remove_handle: allow multiple removes"),
> > so we track the "curlm" membership of the curl easy handle
> > ourselves with a new "in_multi" flag.
>
> Does curl provide a meaningful error here? I'm just wondering if we
> could simply let curl handle this, and just ignore the error that comes
> from older versions. We're basically just replicating curl's own state
> data here.curl before 7.33.0 returned CURLM_BAD_EASY_HANDLE. This error code also happens if we pass a bad/corrupt easy handle; so it could be hiding an error on our end.