From 79f5c296c05bd8754d90272468c985f34b824b4b Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Thu, 30 Nov 2017 11:38:12 -0600 Subject: [PATCH] ignore "interrupted" exception in progress callback Context/discusson: https://github.com/NixOS/nix/issues/1692#issuecomment-348282301 --- src/libstore/download.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; }