libutil: prefer reporting libarchive source errors
if curl fails during a transfer and said transfer is piped through libarchive we see very strange errors (#1009). in such cases we'll want to prioritize reporting the source errors to allow debugging. Change-Id: I8cc231257eca5b749471ecd38df15071170decc2
This commit is contained in:
@@ -417,7 +417,10 @@ struct DecompressionStream : DecompressorPipes, AsyncInputStream
|
||||
if (const auto got = ::read(uncompressed.readSide.get(), buffer, size); got > 0) {
|
||||
co_return got;
|
||||
} else if (got == 0) {
|
||||
// decompresser must have finished, poll for any errors and return EOF
|
||||
if (feedExc) {
|
||||
std::rethrow_exception(feedExc);
|
||||
}
|
||||
// decompresser must have finished, poll for any errors and return EOF.
|
||||
thread.get();
|
||||
co_return std::nullopt;
|
||||
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||
|
||||
Reference in New Issue
Block a user