Close piped processes on cancellation

This commit is contained in:
2026-11-02 03:16:36 +00:00
parent 9c02ed769b
commit 595745c7b1
6 changed files with 150 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ func (reader *BlobReader) Read(ctx context.Context, objectID string) ([]byte, er
reader.mu.Lock()
defer reader.mu.Unlock()
if err := ctx.Err(); err != nil {
return nil, fmt.Errorf("read blob %s: %w", objectID, err)
}
if reader.terminal != nil {
return nil, reader.terminal
}