curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Reseting a curl multi handle for reuse

From: Daniel Stenberg via curl-library <>
Date: Mon, 21 Aug 2023 13:32:52 +0200 (CEST)

On Mon, 21 Aug 2023, Taw via curl-library wrote:

> I want to use a multi handle for async connection.Not sure if the code
> belowis correct, because I don't see any curl_multi_reset in the
> documentation and I don't know how to reset it.

There is no curl_multi_reset(). I have never seen anyone wanting one or having
had a good reason for it.

What would you like the reset to do? Just restore all setopts to their default

> What happens to the curlMulti if I don't reset it between calls, especially
> in case of errors? 

Nothing. There's no persistent error state stored in the handle. An
application could very well spend forever just using the same multi handle,
adding and removing easy handles over time.

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features

Received on 2023-08-21