forked from lix-project/lix
Downloader: Remove a possible double call to Callback
This commit is contained in:
parent
918717f3b5
commit
8c4ea7a451
|
@ -342,15 +342,9 @@ struct CurlDownloader : public Downloader
|
||||||
(httpStatus == 200 || httpStatus == 201 || httpStatus == 204 || httpStatus == 206 || httpStatus == 304 || httpStatus == 226 /* FTP */ || httpStatus == 0 /* other protocol */))
|
(httpStatus == 200 || httpStatus == 201 || httpStatus == 204 || httpStatus == 206 || httpStatus == 304 || httpStatus == 226 /* FTP */ || httpStatus == 0 /* other protocol */))
|
||||||
{
|
{
|
||||||
result.cached = httpStatus == 304;
|
result.cached = httpStatus == 304;
|
||||||
|
act.progress(result.bodySize, result.bodySize);
|
||||||
done = true;
|
done = true;
|
||||||
|
callback(std::move(result));
|
||||||
try {
|
|
||||||
act.progress(result.bodySize, result.bodySize);
|
|
||||||
callback(std::move(result));
|
|
||||||
} catch (...) {
|
|
||||||
done = true;
|
|
||||||
callback.rethrow();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue