diff --git a/src/org/fox/ttrss/FeedsFragment.java b/src/org/fox/ttrss/FeedsFragment.java index 47ebc415..9eae321b 100644 --- a/src/org/fox/ttrss/FeedsFragment.java +++ b/src/org/fox/ttrss/FeedsFragment.java @@ -595,13 +595,17 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh @Override protected Integer doInBackground(FeedList... params) { + FeedList localList = new FeedList(); + try { + localList.addAll(params[0]); + File storage = m_activity.getExternalCacheDir(); final File iconPath = new File(storage.getAbsolutePath() + ICON_PATH); if (!iconPath.exists()) iconPath.mkdirs(); if (iconPath.exists()) { - for (Feed feed : params[0]) { + for (Feed feed : localList) { if (feed.id > 0 && feed.has_icon && !feed.is_cat) { File outputFile = new File(iconPath.getAbsolutePath() + "/" + feed.id + ".ico"); String fetchUrl = m_baseUrl + "/" + feed.id + ".ico"; @@ -631,6 +635,11 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh try { URL url = new URL(fetchUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + + conn.setConnectTimeout(1000); + conn.setReadTimeout(5000); + + Log.d(TAG, "[downloadFile] " + url); String httpLogin = m_prefs.getString("http_login", ""); String httpPassword = m_prefs.getString("http_password", "");