diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-03T10·51+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-09-03T11·45+0200 |
commit | 8c4ea7a4516c517a0dd37b446bf5c1a6b157064c (patch) | |
tree | 2f93148b0eacf870c688a522af8460c7d49c600a /src/libstore/download.cc | |
parent | 918717f3b5fa69c89e3393f806ff263f90798567 (diff) |
Downloader: Remove a possible double call to Callback
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r-- | src/libstore/download.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index c322d267d4f2..a7d059465b0e 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -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; + act.progress(result.bodySize, result.bodySize); done = true; - - try { - act.progress(result.bodySize, result.bodySize); - callback(std::move(result)); - } catch (...) { - done = true; - callback.rethrow(); - } + callback(std::move(result)); } else { |