I'm using SDWebImage in my application and it works great on WiFi and 'good' 3G connections. However under slow network connections (e.g. poor 3G) it always fails downloading images because it looks like there's a 10 second timeout limit.
Can I extend such timeout so that the download can take longer before failing?
I could not find any 'timeout' property on the SDWebImage headers and I just found some hardcoded values such as
NSMutableURLRequest *request = [NSMutableURLRequest.alloc initWithURL:url cachePolicy:(options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData) timeoutInterval:15];
Before I used SDWebImage my low-end users were able to download images successfully (just by waiting a bit more), now the download always fails. (I'm using 'http://mschrag.github.io' to simulate slow network conditions)
I submitted a change that added a
downloadTimeout
property to theSDWebImageDownloader
class. See pull request #591. And it looks like, as of this writing, that the pull request was accepted and merged into 'master'. Hopefully that solves things for you.