From 794e4ab475399363982f5602ed1ba12bf0be4343 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Sep 2016 17:25:12 +0200 Subject: [PATCH] Fix "Promise already satisfied" error --- src/libstore/http-binary-cache-store.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index 60728de0..74ae7a4d 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -86,7 +86,9 @@ protected: std::rethrow_exception(exc); } catch (DownloadError & e) { if (e.error == Downloader::NotFound || e.error == Downloader::Forbidden) - success(0); + return success(0); + failure(exc); + } catch (...) { failure(exc); } });