Fix "Promise already satisfied" error

This commit is contained in:
Eelco Dolstra 2016-09-20 17:25:12 +02:00
parent 4de0639105
commit 794e4ab475

View file

@ -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);
}
});