解决curl超时导致应用崩溃的问题
2015-03-24 15:31
323 查看
目前游戏用curl下载取版本数据,下载资源包之类的。
偶尔会发现在curl返回6,即CURLE_COULDNT_RESOLVE_HOST的时候,程序会崩溃。
网上查了下,在curl调用前,调用
即可解决此问题
google关键词:
curl reslove host crash
参考链接
http://curl.haxx.se/mail/archive-2008-05/0081.html http://stackoverflow.com/questions/13702408/curl-requests-in-pthread-crashes-after-completion-of-request http://discuss.cocos2d-x.org/t/curl-crashes-when-the-dns-try-to-resolve-the-host-but-exceeds-the-timout-of-curl/5335
偶尔会发现在curl返回6,即CURLE_COULDNT_RESOLVE_HOST的时候,程序会崩溃。
网上查了下,在curl调用前,调用
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
即可解决此问题
google关键词:
curl reslove host crash
参考链接
http://curl.haxx.se/mail/archive-2008-05/0081.html http://stackoverflow.com/questions/13702408/curl-requests-in-pthread-crashes-after-completion-of-request http://discuss.cocos2d-x.org/t/curl-crashes-when-the-dns-try-to-resolve-the-host-but-exceeds-the-timout-of-curl/5335
相关文章推荐
- 解决curl超时导致应用崩溃的问题
- 第一个redis应用方法导致的提示redis LRANGE命令超时问题的解决
- LINUX C语言 SOCKET 服务器断开导致客户端SEND崩溃问题解决办法
- 开发新浪微博应用出现以下问题Fatal error:Call to undefined function curl_init() in错误的解决方法
- 《对“XXX::Invoke”类型的已垃圾回收委托进行了回调。这可能会导致应用程序崩溃、损坏和数据丢失。向非托管代码传递委托时,托管应用程序必须让这些委托保持活动状态,直到确信不会再次调用它们》的问题的解决方法
- PHP 大图片操作导致内存崩溃及超时的问题
- windows下nginx+php-cgi子进程问题(解决curl_exec超时问题)
- 解决PCoIP连接View 5.0虚拟桌面超时断开导致无法再次登录的问题
- 用curl 代替file_get_contents 解决获取网络资源的超时问题
- 类型的已垃圾回收委托进行了回调。这可能会导致应用程序崩溃、损坏和数据丢失。向非托管代码传递委托时,托管应用程序必须让这些委托保持活动状态,直到确信不会再次调用它们的问题的解决方法 续集
- PHP中curl_multi_exec会一直返回超时的问题解决
- PHP解决Curl的毫秒超时的问题
- 解决使用MySQL C-API开发应用时的连接超时问题
- MyEclipse频繁崩溃导致Address already in use的问题的解决
- 解决PCoIP连接View 5.0虚拟桌面超时断开导致无法再次登录的问题
- 解决HBase Replication在数据大量写入时导致RegionServer崩溃问题
- 因workplace出问题导致 eclipse 崩溃 解决办法。
- 如何解决迅雷插件导致IE10崩溃的问题
- 解决PCoIP连接View 5.0虚拟桌面超时断开导致无法再次登录的问题
- 解决Execwb 导致 ado崩溃的问题。