mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
set different http timeouts based on what we are fetching
This commit is contained in:
@@ -37,12 +37,13 @@ public class FeedFetcher {
|
||||
log.debug("Fetching feed {}", feedUrl);
|
||||
FetchedFeed fetchedFeed = null;
|
||||
|
||||
HttpResult result = getter.getBinary(feedUrl, lastModified, eTag);
|
||||
int timeout = 20000;
|
||||
HttpResult result = getter.getBinary(feedUrl, lastModified, eTag, timeout);
|
||||
if (extractFeedUrlFromHtml) {
|
||||
String extractedUrl = extractFeedUrl(
|
||||
StringUtils.newStringUtf8(result.getContent()), feedUrl);
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(extractedUrl)) {
|
||||
result = getter.getBinary(extractedUrl, lastModified, eTag);
|
||||
result = getter.getBinary(extractedUrl, lastModified, eTag, timeout);
|
||||
feedUrl = extractedUrl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user