On Wed, 20 Sep 2017, Vidyanand Nille wrote:

Please don't top-post, it makes it hard to follow the thread.

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.

I don't think you will affect the number of connections you get in TIME_WAIT state by re-using easy handles. When you use the multi interface, the connection pool is owned by the multi handle so you'll create new connections or re-use old ones exactly the same way, independently of using new or old easy handles.

So is there any way to avoid TIME_WAIT connections?

No. Unless there's a bug in there somehere of course, but libcurl already does what it can to avoid those.

--

 / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to