On Thu, Nov 11, 2010 at 07:27:01PM +0530, Manish Pohnekar wrote: > We are using the curl library in c++ libraries > > our application is get hanged if the url is unable to load even > after the timeout exceeds aproximake > > we are looking for setting such a way the even if the times to load > url exceed the time out our application shoud not hang or gp in > infinite loop > > we are using the following api in out code do we [...] > \cURLHandle.cpp(146): curl_easy_setopt(m_curl, CURLOPT_NOSIGNAL, 1); > /* to prevent signal in multi-threaded applications */ > cURLHandle.cpp(208): curl_easy_setopt(m_curl, CURLOPT_TIMEOUT, m_timeout);
Note that CURLOPT_NOSIGNAL takes a long parameter not an int. If you're not using an asynchronous resolver, setting NOSIGNAL is going to disable resolve timeouts. The documentation for NOSIGNAL warns of this. >>> Dan ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
