Downloader: Remove a possible double call to Callback

This commit is contained in:
Eelco Dolstra 2019-09-03 12:51:14 +02:00
parent 918717f3b5
commit 8c4ea7a451
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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 */))
{
result.cached = httpStatus == 304;
done = true;
try {
act.progress(result.bodySize, result.bodySize);
callback(std::move(result));
} catch (...) {
done = true;
callback.rethrow();
}
callback(std::move(result));
}
else {