curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: break out of the curl_easy_perform loop

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 11 Aug 2018 13:49:32 +0200 (CEST)

On Sat, 11 Aug 2018, Deven via curl-library wrote:

> Now, I would like to cleanly close the application which uses the curl easy
> interface. The curl operation happens in a separate thread. Is there a way
> to cancel the curl operation, break out of the blocking curl easy perform
> function?

This is mentioned in the FAQ:

   https://curl.haxx.se/docs/faq.html#How_do_I_stop_an_ongoing_transfe

tl;dr: return an error from a callback (if the timeout options aren't good
enough)

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-08-11