Skip to content

Commit

Permalink
[rss] CRssReader::Process: Sleep 5 secs before retrying CCurlFile::Ge…
Browse files Browse the repository at this point in the history
…t().
  • Loading branch information
ksooo authored and popcornmix committed Mar 2, 2015
1 parent c84d89c commit 55daad5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xbmc/utils/RssReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ void CRssReader::Process()
{
if (timeout.IsTimePast())
{
CLog::Log(LOGERROR, "Timeout whilst retrieving %s", strUrl.c_str());
http.Cancel();
CLog::Log(LOGERROR, "Timeout while retrieving rss feed: %s", strUrl.c_str());
break;
}
nRetries--;
Expand All @@ -176,12 +175,18 @@ void CRssReader::Process()
}
}
else
{
if (http.Get(strUrl, strXML))
{
fileCharset = http.GetServerReportedCharset();
CLog::Log(LOGDEBUG, "Got rss feed: %s", strUrl.c_str());
break;
}
else if (nRetries > 0)
Sleep(5000); // Network problems? Retry, but not immediately.
else
CLog::Log(LOGERROR, "Unable to obtain rss feed: %s", strUrl.c_str());
}
}
http.Cancel();
}
Expand Down

0 comments on commit 55daad5

Please sign in to comment.