增加flush 测试
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2026-06-05 13:16:18 +08:00
parent 3fdfb3cc4b
commit c8d181e557
1 changed files with 6 additions and 5 deletions

View File

@ -544,22 +544,23 @@ public class OSSService : IOSSService
var args = new GetObjectArgs()
.WithBucket(minIOConfig.BucketName)
.WithObject(ossRelativePath)
.WithCallbackStream(stream =>
.WithCallbackStream(async source =>
{
stream.CopyTo(pipe.Writer.AsStream());
await source.CopyToAsync(pipe.Writer.AsStream());
await pipe.Writer.FlushAsync();
});
await minioClient.GetObjectAsync(args);
await pipe.Writer.CompleteAsync();
}
catch (Exception ex)
finally
{
await pipe.Writer.CompleteAsync(ex);
await pipe.Writer.CompleteAsync();
}
});
return pipe.Reader.AsStream();
#region 废弃2
//var pipe = new System.IO.Pipelines.Pipe();