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