cURL / Mailing Lists / curl-library / Single Mail

curl-library

how to judge we close the socket fd?

From: <lantian0811_at_163.com>
Date: Mon, 23 Mar 2015 23:07:02 +0800 (CST)

Hi ,
I use multi socket to download the picture .and after running many hours,I found the process use so many fd,
for example: my process id is 28688 , I use ls -l /proc/28688/fd | wc -l to see the current fd this process use,and this number is always increasing until the socket exhaust ,and I could not connect the server ,and the curl return the value CURLE_COULDNT_CONNECT.so I doubt I do not release the fd?
I search this on the website, and found that we use curl_easy_cleanup(easy) to close socket fd ,right? Or other method to release the socket fd ?
thanks a lot

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-03-23