forked from lix-project/lix
libstore: remove FileTransferRequest::tries
it's never set, and then only used internally. *once*.
Change-Id: I32585b1821e979f3ebb53b794ba0d1f576126b92
This commit is contained in:
parent
af27d1ecd8
commit
6c2609c5f9
|
@ -56,6 +56,7 @@ struct curlFileTransfer : public FileTransfer
|
||||||
std::string statusMsg;
|
std::string statusMsg;
|
||||||
|
|
||||||
unsigned int attempt = 0;
|
unsigned int attempt = 0;
|
||||||
|
const size_t tries = fileTransferSettings.tries;
|
||||||
|
|
||||||
/* Don't start this download until the specified time point
|
/* Don't start this download until the specified time point
|
||||||
has been reached. */
|
has been reached. */
|
||||||
|
@ -438,7 +439,7 @@ struct curlFileTransfer : public FileTransfer
|
||||||
sink, we can only retry if the server supports
|
sink, we can only retry if the server supports
|
||||||
ranged requests. */
|
ranged requests. */
|
||||||
if (err == Transient
|
if (err == Transient
|
||||||
&& attempt < request.tries
|
&& attempt < tries
|
||||||
&& (!this->dataCallback
|
&& (!this->dataCallback
|
||||||
|| writtenToSink == 0
|
|| writtenToSink == 0
|
||||||
|| (acceptRanges && encoding.empty())))
|
|| (acceptRanges && encoding.empty())))
|
||||||
|
|
|
@ -59,7 +59,6 @@ struct FileTransferRequest
|
||||||
std::string expectedETag;
|
std::string expectedETag;
|
||||||
bool verifyTLS = true;
|
bool verifyTLS = true;
|
||||||
bool head = false;
|
bool head = false;
|
||||||
size_t tries = fileTransferSettings.tries;
|
|
||||||
|
|
||||||
FileTransferRequest(std::string_view uri)
|
FileTransferRequest(std::string_view uri)
|
||||||
: uri(uri) { }
|
: uri(uri) { }
|
||||||
|
|
Loading…
Reference in a new issue