curl-library
Curl_multi_perform goes into infinite loop
Date: Thu, 28 Jul 2011 22:39:30 +0530
Hi,
I have an https client using libcurl (with openssl) multi APIs.
Occasionally, I see that if remote peer application exits, the libcurl
client's 'multi-loop' (the one which calls curl_multi_perform repeatedly
till running handles reach zero) goes into an infinite loop instead of
breaking out. Is this expected behavior? Also, after each curl_multi_perform
call, I also check if any errors occurred on the individual transfers using
curl_multi_info_read function in which case I can exit the loop. I would
like to know what is the definitive way to find out if remote peer has
disconnected (and thereby error out of the multi-loop) while using libcurl?
I have come across articles which suggest we can attempt to read from the
socket which would but I am not sure of implications of doing this while
using libcurl. Is there any callback I can register for or info I can query
in libcurl to achieve this?
Thanks
Ajil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-28