cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem using Curl multi interface and persistent connections

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Jun 2010 19:56:57 +0200 (CEST)

On Wed, 2 Jun 2010, Kartik Mahajan wrote:

> // And finally call this
>
> curl_multi_cleanup(curl_multi_handle);

When you use the multi interface, all the connections that are kept alive for
subsequent re-use are stored in the multi handle. The moment you call
curl_multi_cleanup(), you also close all remaining connections and they can
then no longer be re-used.

With the multi interface, you should make an effort to re-use the multi handle
instead of init/cleanup new ones all the time.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-02