curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Sending concurrent requests with single libcurl handle

From: Vidyanand Nille via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 20 Sep 2017 17:24:57 +0530

Yes that's why initially I wrote program to create new one everytime and cleaning up old, but problem I am facing is it creates too many connections in TIME_WAIT state and I doubt it's affecting performance badly.

So is there any way to avoid TIME_WAIT connections?

Regards,
Vidyanand

  Original Message  
From: daniel_at_haxx.se
Sent: September 20, 2017 5:20 PM
To: vidyanand.nille_at_gmail.com
Cc: curl-library_at_cool.haxx.se
Subject: Re: Sending concurrent requests with single libcurl handle

On Wed, 20 Sep 2017, ViDyAnAnD NiLLe wrote:

> How can i reuse same easyhandle instead of cleaning it up? I tried to call
> curl_easy_reset and then add it back to multihandle with different URL but
> its crashing.

That's how you do it, and it isn't supposed to crash. If you run a recent
libcurl version I'd encourage you to produce a reproducible example and file a
bug.

This said, when you use the multi interface, you don't save very much by
re-using easy handles (mostly memory handling) so killing the old handle and
creating a new one to add is not a very bad work-around.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-20