mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
Downloader: Propagate exceptions from decompressionSink->finish()
(cherry picked from commit 15fa70cd1b
)
This commit is contained in:
parent
b43e1e186e
commit
2fef4dd296
1 changed files with 7 additions and 2 deletions
|
@ -327,8 +327,13 @@ struct CurlDownloader : public Downloader
|
||||||
debug("finished %s of '%s'; curl status = %d, HTTP status = %d, body = %d bytes",
|
debug("finished %s of '%s'; curl status = %d, HTTP status = %d, body = %d bytes",
|
||||||
request.verb(), request.uri, code, httpStatus, result.bodySize);
|
request.verb(), request.uri, code, httpStatus, result.bodySize);
|
||||||
|
|
||||||
if (decompressionSink)
|
if (decompressionSink) {
|
||||||
decompressionSink->finish();
|
try {
|
||||||
|
decompressionSink->finish();
|
||||||
|
} catch (...) {
|
||||||
|
writeException = std::current_exception();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (code == CURLE_WRITE_ERROR && result.etag == request.expectedETag) {
|
if (code == CURLE_WRITE_ERROR && result.etag == request.expectedETag) {
|
||||||
code = CURLE_OK;
|
code = CURLE_OK;
|
||||||
|
|
Loading…
Reference in a new issue