Skip to content

Commit 5ffa3fb

Browse files
authored
fix(uploads): ignore EOF when sending finish write message (#1931)
Signed-off-by: Jose I. Paris <[email protected]>
1 parent 1751de7 commit 5ffa3fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/casclient/uploader.go

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ doUpload:
103103
ResourceName: resource,
104104
FinishWrite: true,
105105
}); err != nil {
106+
// EOF might be returned when the CAS backend detects a duplicated upload, skipping it in that case
107+
if errors.Is(err, io.EOF) {
108+
break doUpload
109+
}
106110
return nil, fmt.Errorf("sending the finished upload message %w", err)
107111
}
108112
break

0 commit comments

Comments
 (0)