cURL / Mailing Lists / curl-library / Single Mail


Re: "easy handled already used in multi handle"

From: Daniel Stenberg <>
Date: Sat, 3 May 2014 00:33:39 +0200 (CEST)

On Thu, 1 May 2014, Chris Johnson wrote:

> However, I'm perplexed. The code only uses the libcurl-easy interface, for
> the most part.


> So how is it ending up in the libcurl-multi interface?

The easy interface is just an internal wrapper around the multi interface so
the curl_easy_perform() will use the multi interface "under the hood". Not
that it explains why you get the error, but that may explain how the multi
interface got involved in the first place.

> Is this condition even a real error? Perhaps my code should just ignore the
> specific condition associated with the message "easy handled already used in
> multi handle"?

It is a true error situation. curl_easy_perform() is called and libcurl
detects that the easy handle still has a reference to a multi handle, which it
shouldn't at any time when curl_easy_perform() is entered.

The question is of course why and how... The only way I see right now how it
can happen is if curl_easy_perform() returns early from
lib/easy.c:easy_perform as I believe it wrongly leaves data->multi assigned
when it fails early in that function, but is that really what happened to you?

List admin:
Received on 2014-05-03