CCHttpClient发送数据时断网导致闪退的解决方法

来源:互联网 发布:知乎学到老 编辑:程序博客网 时间:2024/05/20 03:42

http://www.cocos2d-x.org/forums/6/topics/38239?r=38328#message-38328


在HttpClient.cpp的configCURL方法中添加

    code = curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1);
    if (code != CURLE_OK) {
        return false;
    }