aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2017-11-30 11:38:12 -0600
committerWill Dietz <w@wdtz.org>2017-11-30 12:45:54 -0600
commit79f5c296c05bd8754d90272468c985f34b824b4b (patch)
tree426de36559c0dfc3769bd35dc96fdea17646c81e
parentcd74a55afc31638940d5b6a011afc3a4ebedec9d (diff)
ignore "interrupted" exception in progress callback
Context/discusson: https://github.com/NixOS/nix/issues/1692#issuecomment-348282301
-rw-r--r--src/libstore/download.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index da31029b4..56560203a 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -169,7 +169,11 @@ struct CurlDownloader : public Downloader
int progressCallback(double dltotal, double dlnow)
{
- act.progress(dlnow, dltotal);
+ try {
+ act.progress(dlnow, dltotal);
+ } catch (nix::Interrupted &) {
+ assert(_isInterrupted);
+ }
return _isInterrupted;
}