Small code clean-up.
This commit is contained in:
parent
4038c5605b
commit
a7b6af2111
@ -231,13 +231,14 @@ void MUtils::UpdateChecker::checkForUpdates(void)
|
|||||||
elapsedTimer.start();
|
elapsedTimer.start();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!mirrorList.isEmpty())
|
if (mirrorList.isEmpty())
|
||||||
{
|
{
|
||||||
|
goto endLoop; /*depleted!*/
|
||||||
|
}
|
||||||
const QString hostName = mirrorList.dequeue();
|
const QString hostName = mirrorList.dequeue();
|
||||||
if (tryContactHost(hostName, connectionTimout))
|
if (tryContactHost(hostName, connectionTimout))
|
||||||
{
|
{
|
||||||
setProgress(1 + (connectionScore += 1));
|
setProgress(1 + (connectionScore += 1));
|
||||||
elapsedTimer.restart();
|
|
||||||
if (connectionScore >= MIN_CONNSCORE)
|
if (connectionScore >= MIN_CONNSCORE)
|
||||||
{
|
{
|
||||||
goto endLoop; /*success*/
|
goto endLoop; /*success*/
|
||||||
@ -247,7 +248,6 @@ void MUtils::UpdateChecker::checkForUpdates(void)
|
|||||||
{
|
{
|
||||||
mirrorList.enqueue(hostName); /*re-schedule*/
|
mirrorList.enqueue(hostName); /*re-schedule*/
|
||||||
}
|
}
|
||||||
}
|
|
||||||
CHECK_CANCELLED();
|
CHECK_CANCELLED();
|
||||||
}
|
}
|
||||||
while(!elapsedTimer.hasExpired(globalTimout));
|
while(!elapsedTimer.hasExpired(globalTimout));
|
||||||
|
Loading…
Reference in New Issue
Block a user