如题
设置AssetsManagerEx中DEFAULT_CONNECTION_TIMEOUT为15秒。
启动更新,发现当无法连接服务器时,触发下载失败的时间长达53秒左右,这样会导致在更新界面卡很久。
日志如下:
11-10 14:27:47.508 32213-32231/com.moloong.taiji D/cocos2d-x debug info: Start Update. 11-10 14:28:41.143 32213-32213/com.moloong.taiji D/Cocos2dxDownloader: onFailure(code:0 headers:null throwable:java.net.ConnectException: failed to connect to /192.168.51.69 (port 80) after 15000ms: isConnected failed: ECONNREFUSED (Connection refused) id:1 11-10 14:28:41.148 32213-32231/com.moloong.taiji D/cocos2d-x debug info: AssetsManagerEx : Fail to download version file, step skipped 11-10 14:29:34.268 32213-32213/com.moloong.taiji D/Cocos2dxDownloader: onFailure(code:0 headers:null throwable:java.net.ConnectException: failed to connect to /192.168.51.69 (port 80) after 15000ms: isConnected failed: ECONNREFUSED (Connection refused) id:2 11-10 14:29:34.273 32213-32231/com.moloong.taiji D/cocos2d-x debug info: Fail to download manifest file, update skipped.