Allow to pass timeout to obtainNextWorkingUrl

Sometimes timeout for news in launcher, needs to be investigated
This commit is contained in:
Klaus Basan
2017-04-22 03:04:11 +02:00
committed by Mathew Sutcliffe
parent f7c4292695
commit 640ad99520
4 changed files with 7 additions and 7 deletions

View File

@@ -183,10 +183,10 @@ void CSwiftLauncher::initStyleSheet()
void CSwiftLauncher::loadLatestNews()
{
CFailoverUrlList newsUrls(sGui->getGlobalSetup().getSwiftLatestNewsUrls());
const CUrl newsUrl(newsUrls.obtainNextWorkingUrl());
const CUrl newsUrl(newsUrls.obtainNextWorkingUrl(true, 10 * 1000));
if (newsUrl.isEmpty())
{
CLogMessage(this).error("No working news URL in %1") << newsUrls.toQString();
CLogMessage(this).warning("No working news URL in %1") << newsUrls.toQString();
return;
}
sGui->getFromNetwork(newsUrl, { this, &CSwiftLauncher::ps_displayLatestNews});