mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Allow connection retry on some more error types
This commit is contained in:
parent
ee0c49db9d
commit
8b51f3ff04
@ -232,10 +232,16 @@ void Downloader::emitReadReady()
|
|||||||
|
|
||||||
void Downloader::insertError(const QUrl &url, QNetworkReply::NetworkError error)
|
void Downloader::insertError(const QUrl &url, QNetworkReply::NetworkError error)
|
||||||
{
|
{
|
||||||
if (error == QNetworkReply::OperationCanceledError)
|
switch (error) {
|
||||||
_errorDownloads.insert(url, _errorDownloads.value(url) + 1);
|
case QNetworkReply::OperationCanceledError:
|
||||||
else
|
case QNetworkReply::TimeoutError:
|
||||||
_errorDownloads.insert(url, RETRIES);
|
case QNetworkReply::RemoteHostClosedError:
|
||||||
|
case QNetworkReply::ConnectionRefusedError:
|
||||||
|
_errorDownloads.insert(url, _errorDownloads.value(url) + 1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
_errorDownloads.insert(url, RETRIES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Downloader::readData(QNetworkReply *reply)
|
void Downloader::readData(QNetworkReply *reply)
|
||||||
|
Loading…
Reference in New Issue
Block a user