mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Fix use of StreamReadable
: Ensure no empty Bytes
(#799)
which would cause the `StreamReadable` to return eof even if the underlying stream is still open and has not sent EOF yet. Fixed #777 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
9635e05d6c
commit
1e49460ac7
1 changed files with 4 additions and 0 deletions
|
@ -96,6 +96,10 @@ where
|
|||
try_join(
|
||||
async move {
|
||||
while let Some(bytes) = stream.next().await.transpose()? {
|
||||
if bytes.is_empty() {
|
||||
continue;
|
||||
}
|
||||
|
||||
if tx.send(bytes).await.is_err() {
|
||||
// The extract tar returns, which could be that:
|
||||
// - Extraction fails with an error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue